Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/284.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
卷曲不';无法通过HTTPS在PHP上获取站点内容_Php_Unix_Curl - Fatal编程技术网

卷曲不';无法通过HTTPS在PHP上获取站点内容

卷曲不';无法通过HTTPS在PHP上获取站点内容,php,unix,curl,Php,Unix,Curl,我阅读了所有的互联网,尝试了几乎所有的解决方案,但没有任何效果 如果我跑curlhttp://... 网站,它的工作,但如果我运行https://... 没有 我正在用PHP5.6运行centos 7 如果我试着用这个著名的答案 curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); 唯一能帮我得到这个网站的是 curl -4svo/dev/null --ciphers ecdhe_ecdsa_aes_128_sha https://..... 然而

我阅读了所有的互联网,尝试了几乎所有的解决方案,但没有任何效果

如果我跑curlhttp://... 网站,它的工作,但如果我运行https://... 没有

我正在用PHP5.6运行centos 7

如果我试着用这个著名的答案

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
唯一能帮我得到这个网站的是

curl -4svo/dev/null --ciphers ecdhe_ecdsa_aes_128_sha https://.....
然而,由于我需要发送我的头,这不是一个解决方案,我需要一些与curl_setopt兼容的东西

更新错误

我明白了:curl:(35)无法与同伴安全地通信:否 通用加密算法


我认为,这个问题是由cURL版本不支持ECC 256位SSL证书和ECDSA签名算法(CloudFlare使用)引起的。您可以通过运行以下命令来测试您的cURL版本是否支持此加密:

curl -1IsS --ciphers ecdhe_ecdsa_aes_128_sha https://sslspdy.com
如果出现以下情况,则表示您的卷发已过时:

curl: (59) Unknown cipher in list: ecdhe_ecdsa_aes_128_sha

这是魔术线


curl_setopt($ch,CURLOPT_SSL_CIPHER_LIST,'ecdhe_ecdsa_aes_128_sha')

HTTP/1.1 200 OK Server:cloudflare nginx日期:2015年10月28日星期三10:42:24 GMTIm在过去12个小时里已经用这个卷曲的东西把我的头撞到墙上了这个:卷曲--密码ecdhe_ecdsa_aes_256_sha返回空:[root@centos7bf]#curl--密码ecdhe_ecdsa_aes_256_sha repo.thinkofdeath.co.uk/content/groups/public[root@centos7bf]#