I have a website that connects using cURL (latest version) to a secure gateway for payment.
Problem: cURL always returns 0 the length of the content. I only get headers. And only when I set cURL to return headers. I have the following flags.
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);
Return header
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
I also tried cURL'ing on different sites and they returned the content in order. I think the problem may have something to do with the https connection.
I talked to the company and they are useless.
Has anyone else experienced this error and know what to do? Should I pipe cURL and try to use fsockopen() ?
Thank.:)
alex Nov 25 '08 at 1:23 2008-11-25 01:23
source share