我正在尝试从soundcloud.com抓取数据...但问题是它适用于http ...每当我输入https网址时,页面都是空白且没有结果,没有错误太
我有一个共享主机,我已经使用curl.cainfo=/php/cacert.pem
我的卷曲代码看起来像这样......
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_CAINFO, getcwd() . "/php/cacert.pem");
$contents = curl_exec($ch);
if($contents === FALSE) {
die(curl_error($ch));
}
curl_close($ch);
return $contents;
我已从http://curl.haxx.se/docs/caextract.html下载了证书 并将它们复制到myfolder / php ...
请帮忙......