curl errno 35(与[secure site]连接的未知SSL协议错误:443) [英] curl errno 35 (Unknown SSL protocol error in connection to [secure site]:443)

查看:1009
本文介绍了curl errno 35(与[secure site]连接的未知SSL协议错误:443)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用curl发布到外部网址,外部网页使用https,这里是服务器的描述我使用

i'm trying to make post to an external url using curl, the externa page use https, here is the desc of the server i'm using

服务器Apache / 2.2.11(Win32)mod_ssl / 2.2.11 OpenSSL / 0.9.8k PHP / 5.3.0

Server Apache/2.2.11 (Win32) mod_ssl/2.2.11 OpenSSL/0.9.8k PHP/5.3.0

外部网址重定向到我发送的另一个网址

the external url make a redirect to another url that i send in the post, but everytime i try i get this error


curl_errno = 35(与安全网站连接时出现未知的SSL协议错误: 443)

curl_errno=35 (Unknown SSL protocol error in connection to [secure site]:443)

所以我检查firebug的响应,并说

so i check the firebug for the response and it say

无法加载源文件: http://localhost/3Party/PHP_VPC_3Party_Auth_Capture_Order_DO.php

这里是代码我使用

ob_start();

// initialise Client URL object
$ch = curl_init();
// set the URL of the VPC

curl_setopt ($ch, CURLOPT_URL, $vpcURL);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $this->postData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);  
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_exec ($ch);
if (curl_error($ch)) {
    $this->errorMessage = 
        "curl_errno=". curl_errno($ch) . " (" . curl_error($ch) . ")";
}
curl_close ($ch);


推荐答案

经过几个星期处理这个问题,能够至少建立连接,我不知道是否是真正的答案,但它适用于我,我只是添加到上面的例子,选项使用代理,就像这样

After a few weeks dealing with this issue, i was able to at least establish the connection, i don't know if it is the real answer but it works for me, i just added to the example above, the options to use proxy, just like this

curl_setopt($ch, CURLOPT_HTTPPROXYTUNNEL, 1);
curl_setopt($ch, CURLOPT_PROXYAUTH, CURLAUTH_NTLM );
curl_setopt($ch, CURLOPT_PROXY, 'my.proxy');
curl_setopt($ch, CURLOPT_PROXYPORT, 'my.port');
curl_setopt($ch, CURLOPT_PROXYUSERPWD, 'domain\user:password');  

希望这可以帮助

这篇关于curl errno 35(与[secure site]连接的未知SSL协议错误:443)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆