Hi,
This is my curl code:
$url = 'https://secure.domain.com/process.cgi';
$refferr = "https://".$SERVER['SERVER_NAME'].$SERVER['PHP_SELF'];
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_REFERER, $refferr);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT,120);
curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_POSTFIELDS, $my_cc);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$my_curl = curl_exec($ch);
It is to send credit card data to our payment processor, and get back authorisation data.
Sometimes when I use it, I get the dreaded "cannot connect" page. I believe it's because my request is timing out, because IE won't give it enough time.
I tried the CURLOPT_CONNECTTIMEOUT,120 - but I still get the error.
Any other ideas?
Thanks