2016-04-13 38 views
0

sitede oturum açmaya çalıştığım kod aşağıdadır. Ne işe yaramadığını bilmiyorum, site muhtemelen bir şey değiştirdi ve benim için çalışmaz. Ne olabileceği hakkında hiçbir fikrim yok.cURL Kimlik Doğrulama Sorunu

$var = file_get_contents("http://www.dauanunt.ro/cont/login"); 

$q = explode("name=\"q\" value=\"",$var); 
$q = explode("\" />",$q[1]); 
$q = $q[0]; 

$ga_bi['a'] = 'login'; 
$ga_bi['q'] = $q; 
$ga_bi['h'] = ''; 
$ga_bi['u'] = '[email protected]'; 
$ga_bi['p'] = 'testing'; 
$ga_bi['r'] = '1'; 

$ch = curl_init(); 
curl_setopt($ch, CURLOPT_URL, 'http://www.dauanunt.ro/cont/login'); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_POST, true); 
curl_setopt($ch, CURLOPT_HEADER, 0); 
curl_setopt($ch, CURLOPT_REFERER, "http://www.dauanunt.ro"); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $ga_bi); 
$result = curl_exec($ch); 
curl_close($ch); 

echo $result; 

cevap

0

Herhangi bir kodlama hatası olduğunu sanmıyorum. Giriş yapmaya çalıştığınız web sitesinin giriş sırasında ekstra adımlar eklediğine benziyor.

http://www.dauanunt.ro/c/login5.js