简体   繁体   English

卷曲不起作用没有结果吗?

[英]Curl is not working getting no result?

I have been using a script with curl and it was working fine but since last day it is not working and I come to see this that the site on which I am using this that was first on http and now that got turned into https so I changed the http to https but got no success with it so if you people can please check this code that what is going wrong with it? 我一直在使用带有curl的脚本,并且运行良好,但是从最后一天开始,它无法正常工作,因此我发现我使用的网站最初是http上的,现在变成了https,所以我将http更改为https,但没有成功,因此,如果您可以检查此代码,则出问题了吗?

$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;

https isn't that simple with curl. https并不是那么简单。 You need to configure it to accept the certificate. 您需要对其进行配置以接受证书。 Read more here: http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/ 在此处阅读更多信息: http : //unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM