tebrik ederim çok yararlı özellikle curl ile ilgili türkçe döküman sayısının az olduğunu göz önüne alırsak
<?
set_time_limit(0);
$useragent = "Opera/9.21 (Windows NT 5.1; U; tr)";
$data = "kod=$kullaniciadi&kkod=$sifre&sifre=$kod" ;
$ch = curl_init('https://www.bayinet.com.tr/bayi/security/loginrespond.asp');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_USERAGENT, $useragent);
curl_setopt($ch, CURLOPT_COOKIEFILE, '/home/veliay/public_html/curl/cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEJAR, '/home/veliay/public_html/curl/cookie.txt');
ob_start();
$source=curl_exec ($ch);
curl_setopt($ch, CURLOPT_URL, 'http://www.bayinet.com.tr/bayi/liste_genel_xml.asp');
$res1 = curl_exec($ch);
$resultxml = ob_get_contents();
ob_clean();
curl_close ($ch);
$dosya = 'http://www.bayinet.com.tr/bayi/liste_genel_xml.asp';
$yenidosya = '/home/veliay/public_html/curl/'.date("y_m_d",time()).'_genelliste.xml';
//print $res1;
(is_file($yenidosya))? unlink($yenidosya):'';
$handle = fopen($yenidosya,'a+');
fwrite($handle,$resultxml);
echo 'Baþarýlý bir þekilde '.$yenidosya.' oluþturuldu...';
fclose($handle);
?>burda bayinet.com.tr ye bağlanıp xml dosyasını almaya çalıştım ama alınan içerik şu şekilde
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-9">
<title>bayinet :: güven alışverişi</title>
<style type="text/css">
..
...
....
</BODY>
</HTML>
<?xml version="1.0" encoding="iso-8859-9" ?><root>
<Stok AnaGrup_Kod="AA" AnaGrup_Ad="Anakartlar" AltGrup_Kod="AA31" AltGrup_Ad="Anakartlar-INTEL 478p" Kod="AA358BIO10" Ad="BIOSTAR P4M900 DDR2 VGA+***+SATA 16X 478p" Doviz="1" Fiat_SKullanici="60" Fiat_Bayi="50" Fiat_Ozel="48" Miktar="20+" Garanti="24" Marka="BIO" MarkaIsim="BIOSTAR" Vergi="1" Desi="2" Taksit=""/>
...
.....
........
sorum curl neden giriş yaptığım anasayfanın içeriğinide alıyor