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


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

php curl

阿诺猪华吃雪茄 8 years, 8 months ago

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

wzqgood answered 8 years, 8 months ago


 curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE); 
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, FALSE);

呆零小猫娘 answered 8 years, 8 months ago

Your Answer