2016-02-15 75 views
2

由於「Poodle漏洞」,我的服務器因SSLv3而禁用。Clash Of Clan API |錯誤:14077410:SSL例程:SSL23_GET_SERVER_HELLO:sslv3警報握手失敗

我需要使用CURL來與Clash of Clan API連接。但我得到的錯誤是:"error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure"

我試着使用:

curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, false); 

它的正常工作我的本地系統上,但不上服務器。

代碼

<?php 
$curl = curl_init(); 
curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, false); 
curl_setopt($curl, CURLOPT_URL, 'https://api.clashofclans.com/v1/clans/%23LRQ0PJL9'); 
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Accept: application/json','authorization: Bearer XXXXXXXXXXXXXXXXXXX')); 
curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE); 
$resp = curl_exec($curl); 
curl_close($curl); 
var_dump($resp); 
?> 

服務版本:

PHP:

v5.4.42 

OpenSSL的詳細信息:

OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008 

捲曲詳情:

curl: no URL specified! 
curl: try 'curl --help' for more information 
[email protected] [/etc]# curl --v 
curl: option --v: is ambiguous 
curl: try 'curl --help' for more information 
[email protected] [/etc]# curl -version 
curl: no URL specified! 
curl: try 'curl --help' for more information 
[email protected] [/etc]# curl -V 
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5 
Protocols: tftp ftp telnet dict ldap http file https ftps 
Features: GSS-Negotiate IDN IPv6 Largefile NTLM SSL libz 
+1

可能的複製[PHP 35:錯誤:14094410:SSL例程:SSL3 \ _read \ _BYTES:SSLV3警報握手失敗(http://stackoverflow.com/questions/23568539/ php-35-error14094410ssl-routinesssl3-read-bytessslv3-alert-handshake-failur) –

+0

我嘗試從上面的線程,不爲我工作 –

+0

真棒..我不知道他們有API像WoW一樣工作..展望爲創建我的部族網絡統計。 – choz

回答

0

這是我的託管問題。 升級Open SSL修復了這個問題。

非常感謝所有

0

你在哪裏,你的設置API密鑰你也進入IP從他們的API允許請求。也許你在該列表中添加了自己的IP,但沒有添加你的服務器IP?

https://developer.clashofclans.com

+0

我已經做過這一個。 IP地址沒有問題 –

相關問題