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

php curl获取https地址的设立

WBOY
Release: 2016-06-13 11:46:32
Original
959 people have browsed it

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/

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template