码迷,mamicode.com
首页 > 其他好文 > 详细

curl 请求https内容,返回空

时间:2014-08-18 21:57:02      阅读:369      评论:0      收藏:0      [点我收藏+]

标签:http   os   on   js   c   return   tt   json   

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$api); 
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);//禁止直接显示获取的内容 重要
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); //不验证证书下同
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); //
   
    $json = curl_exec($ch); //获取
    curl_close($ch);

curl 请求https内容,返回空,布布扣,bubuko.com

curl 请求https内容,返回空

标签:http   os   on   js   c   return   tt   json   

原文地址:http://www.cnblogs.com/lbnnbs/p/3920442.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!