cURL cPanel不使用一个域

时间:2016-10-29 10:53:57

标签: php ssl curl cpanel

我的服务器安装了cPanel。

我想从一个链接获取信息。我使用cURL

使用此代码

$postfields = array('code'=>'somecode', 'email'=>'email@gmail.com');
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://domain.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($postfields));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$result = curl_exec($ch);
var_dump($result);

它正在使用localhost和其他服务器但不能在我的服务器上运行。我尝试使用ssh连接它正在使用其他域(HTTP和HTTPS)。

这是显示错误

  

卷曲:(35)与

相关的未知SSL协议错误

PHP INFO

  

PHP版本:5.6.25

     

cURL支持:已启用

     

cURL信息:7.38。

请帮帮我。

0 个答案:

没有答案