2015-02-06 115 views
0

我一直在使用一个脚本与卷曲,它工作正常,但自从最后一天它不工作,我来看看这个网站上我使用这是第一个在http上,现在变成了https所以我改变了http为https,但没有成功,所以如果你可以请检查这个代码是什么问题呢?Curl无法正常工作?

$userSearch = array(); 
$loginURL = "https://www.infamousgangsters.com/checkuser.php"; 
$referer = "https://www.infamousgangsters.com/index.php"; 
$agent = "OrgyBot (Checking list of users to see if they are dead)"; 
$postFields = array 
(
    "username" => "d34dch3ck", 
    "password" => "d34dch3ck93", 
    "sublogin" => "+Login+" 
); 


$ch = curl_init(); 

curl_setopt($ch, CURLOPT_URL, $loginURL); 
curl_setopt($ch, CURLOPT_USERAGENT, $agent); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); 
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, false); 
curl_setopt($ch, CURLOPT_POST, true); 
curl_setopt($ch, CURLOPT_POSTFIELDS, $postFields); 
curl_setopt($ch, CURLOPT_HEADER, false); 
curl_setopt($ch, CURLOPT_REFERER, $referer); 
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookiejar'); 
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookiejar'); 

ob_start(); 
$output = curl_exec($ch); 
ob_end_clean(); 
curl_close($ch); 
unset($ch); 

echo $output; 
+0

检查错误:'if($ output === false){die(curl_error($ ch)); }' – 2015-02-06 16:35:13

回答