cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Speed up curl w/ PHP on processing to iPay

From: InHouse Ticketing - Urbaitel, Marc <urb_at_inhouseticketing.com>
Date: Mon, 3 Jan 2005 18:55:24 -0800 (PST)

I need help with speeding up my curl connection. It takes 5 seconds everytime it connects to one
of our electronic merchants. Does anyone know of a command that will stop the connection once the
response is sent?

This is how I do it now:
$ch = curl_init( );
curl_setopt($ch, CURLOPT_POST,1);
curl_setopt($ch, CURLOPT_POSTFIELDS,$sendA[xml_data]);
curl_setopt($ch, CURLOPT_URL,$sendA[url]);
curl_setopt($ch, CURLOPT_HEADER,0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1);
curl_setopt($ch, CURLOPT_USERAGENT, $sendA[user_agent]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // this line makes it work under https
curl_setopt($ch, CURLOPT_HTTPHEADER, $sendA[http_headers]);
$res = curl_exec($ch);
curl_close( $ch );

Regards,
Marc Urbaitel
CTO/Owner - InHouse Ticketing
(415) 256-8494 tech
(415) 256-8499 support
Received on 2005-01-04