首页 技术教程 实用代码 注册破解 正则表达式 网址导航 电子书籍

PHP获取https下的内容

直接用file_get_contents 以下是PHP代码:【复制代码】 $url = ("https://goalercn.com"); file_get_contents($url); 报错: Warning: file_get_contents(https://goalercn.com) [function.file-get-contents]: failed to open stream: No such file or directory in D:wampwwwgrabber_clientindex.php on line 3 用curl的方式是可以的 以下是PHP代码:【复制代码】 $url = (https://goalercn.com); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, f...
类别:网页编程 - PHP技术    查看:124    更新:2014-05-19