相关疑难解决方法(0)

无法使用cURL连接到HTTPS站点.返回0长度内容.我能做什么?

我有一个使用cURL(最新版本)连接到安全网关进行支付的站点.

问题是cURL总是返回0长度的内容.我只收到标题.只有当我设置cURL返回标题时.我有以下标志.

curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_URL, $gatewayURI);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_POST, 1);
Run Code Online (Sandbox Code Playgroud)

返回的标头是

HTTP/1.1 100 Continue

HTTP/1.1 200 OK
Date: Tue, 25 Nov 2008 01:08:34 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Content-Length: 0
Content-Type: text/html
Set-Cookie: ASPSESSIONIDxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx; path=/
Cache-control: private
Run Code Online (Sandbox Code Playgroud)

我也试过cURL'ing不同的网站,他们返回内容很好.我认为这个问题可能与https连接有关.

我和公司谈过,他们没有帮助.

有没有其他人遇到过这个错误并知道解决方法?我应该抛弃cURL并尝试使用fsockopen()

谢谢.:)

php https curl

63
推荐指数
4
解决办法
10万
查看次数

从谷歌洞察下载csv进行搜索

需要帮助编写脚本使用c#从google insight下载数据

这是下载网址,需要登录

http://www.google.com/insights/search/overviewReport?q=test&cmpt=q&content=1&export=2

我如何输入用户名和密码?需要一些新的帮助c#

c# download

5
推荐指数
1
解决办法
4940
查看次数

标签 统计

c# ×1

curl ×1

download ×1

https ×1

php ×1