php通过curl请求https出现连接被重置

WBOY
Release: 2016-06-06 20:29:06
Original
2131 people have browsed it

前几天重装了centos服务器的apache+php+mysql环境,通过命令curl https://githup.com 可以获取到网页内容,但是通过php代码的curl访问https的出现连接被重置,http可以正常使用,可能原因是什么?请各位大神指点,先谢过了

回复内容:

前几天重装了centos服务器的apache+php+mysql环境,通过命令curl https://githup.com 可以获取到网页内容,但是通过php代码的curl访问https的出现连接被重置,http可以正常使用,可能原因是什么?请各位大神指点,先谢过了

国内问题很复杂,你curl_getinfo看看。
另外 http://github.com会被302跳转到 / 你的正常使用是什么意思?

<code class="php">curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); 
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);</code>
Copy after login
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!