Türkiye'nin En Eski Webmaster Forumu İyinet'e Hoşgeldiniz!

Curl ile Giriş

mertdinler

0
Onaylı Üye
Üye
Katılım
9 Mayıs 2011
Mesajlar
140
Açılan Konu
33
Tepki puanı
1
PHP:
function curlfonk($link, $ref = 'http://www.google.com.tr'){
 $user_agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6';
 $tmp = 'cookie.txt';
 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL, $link);
 curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
 curl_setopt($ch, CURLOPT_REFERER, $ref);
 curl_setopt($ch, CURLOPT_POST, 1);
 curl_setopt($ch, CURLOPT_POSTFIELDS, "ips_username=kullanıcıadım&ips_password=şifrem");
 curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
 curl_setopt($ch, CURLOPT_COOKIEJAR, $tmp);
 curl_setopt($ch, CURLOPT_COOKIEFILE, $tmp);
 $icerik = curl_exec($ch);
 curl_close($ch);
 return $icerik;
}
yukarıdaki curl fonksiyonumu
PHP:
$link = 'http://www.cepmod.com/index.php?app=core&module=global&section=login&do=process';
$kaynak = curlfonk($link);
olarak çağırıyorum fakat giriş yapmaya kalktığım sitede
Kod:
[#10193] Giriş yapma işleminiz de bir sorunla karşılaştık. Lütfen tekrar deneyin.
böyle bir hata veriyor sorun nerde arkadaşlar ?

Ekleme: Kendim Çzdm hidden inputları yazınca iş bitti :D onları görmemişim :)
 
Üst