curl-and-php
cURL on Windows -> Very Slow retrieval
Date: Mon, 14 Apr 2003 08:13:25 -0400
I am having long retrival time problems, typically upward of 10 seconds or
so says the total_time debug statement. Sometimes however it is as low as 2
seconds. I am posting to a secure payment gateway and pulling back the html
results. It just seems to me that this process should be a whole lot faster
then it is. I am using the version of cURL that comes with PHP 4.2.3 for
windows.
========= CODE =============
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://paymentgateway");
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 20); //times out after 4s
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE
5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_REFERER, "https://clientsite);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $strPost);
$result = curl_exec($ch);
/*
echo "<BR><BR>";
print_r(curl_getinfo($ch));
echo "<br><br>cURL error number: " .curl_errno($ch);
echo "<br><br>cURL error: " . curl_error($ch);
echo "<BR><BR>";
*/
curl_close ($ch);
==============================
Is it possible to speed up this process??
Thanks!
Matt Babineau
www.criticalcode.com
e:: matt_at_criticalcode.com p:: 603.943.4237
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-14