2015-02-06 112 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

回答