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 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号