douh9817 2015-02-06 16:30
浏览 35
已采纳

卷曲不起作用没有结果?

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?

$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;
  • 写回答

1条回答 默认 最新

  • drl2051 2015-02-06 16:34
    关注

    https isn't that simple with curl. 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/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么