Home >Backend Development >PHP Tutorial >php curl获取https地址的设立

php curl获取https地址的设立

WBOY
WBOYOriginal
2016-06-13 11:46:32960browse

php curl获取https地址的设置
本来用http的url获取资源,若是换成https,则获取失败。code返回0
原来应该加上以下两个验证配置
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);

参考资料:
http://www.justwinit.cn/post/2653/

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn