卷曲错误:错误:14077410:SSL例程:SSL23_GET_SERVER_HELLO:sslv3警报握手失败

时间:2017-12-21 12:33:37

标签: php ssl curl

我在https://payment.geeksworld.co上收到此错误Curl error: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure 此代码在wamp服务器上正常工作。

SSL版本:OpenSSL / 0.9.8zf

$curl = curl_init("https://api.paytrace.com/oauth/token");
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, false);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, rawurldecode(http_build_query(array(
'password' => 'XXXXX',
'username' => 'XXXXX',
'grant_type' => 'password'
))));
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
'Accept: */*',
'Content-Type: application/x-www-form-urlencoded'
)); 
if(curl_exec($curl) === false)
   echo 'Curl error: ' . curl_error($curl);
else
    echo 'Operation completed without any errors';

0 个答案:

没有答案