curl timeout problems
Posted: Thu Dec 07, 2006 1:09 pm
I have a script for a payment processor that works on my server, but not working on another. I am wondering if it is a windows/curl issue.
Here is the function:
Keep getting Error2 [28] which is: unable to resolve host , CURLE_OPERATION_TIMEOUTED
Like I said works on my server and other servers, but this one doesn't play nice.
FYI,
Windows NT WEBSERVER 5.2
PHP Version 5.2.0
cURL Information libcurl/7.14.0 OpenSSL/0.9.8d zlib/1.2.3
Any help with this error would be greatly appreciated.
Tim
Here is the function:
Code: Select all
function TransmitHTTPRequest($postRequest){
$ch=curl_init($this->_sURL);
if(!$ch)die(sprintf('Error1 [%d]: %s',curl_errno($ch),curl_error($ch)));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$postRequest);
curl_setopt($ch, CURLOPT_HEADER,0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSLVERSION,3);
$http_response = curl_exec($ch);
if(!$http_response)die(sprintf('Error2 [%d]: %s',curl_errno($ch),curl_error($ch)));
curl_close($ch);
if($this->_debug)echo "<BR><BR><b>Data received from server:</b><BR><BR>$http_response";
return $http_response;
} //END TransmitHTTPRequestLike I said works on my server and other servers, but this one doesn't play nice.
FYI,
Windows NT WEBSERVER 5.2
PHP Version 5.2.0
cURL Information libcurl/7.14.0 OpenSSL/0.9.8d zlib/1.2.3
Any help with this error would be greatly appreciated.
Tim