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

curl-and-php

Do not wait after a curl post to a site.

From: Norman E. Avila G. <neavilag_at_gmail.com>
Date: Mon, 18 Jul 2005 16:47:14 -0600

Hi. I am a volunteer to the Guatemala Red Cross, we want to use our personal
cellphones to be advise of any situation easier and faster.
I worked in a small webform that curl-post to the different Cellphone
carriers to send a SMS, currently there are 60 phones on the list, I see
that the response is aprox. 5 minutes, after the submit.

How can i make libcurl to ignore to wait and do the post for the next phone
in list? in order to have a faster response from the submit form...? right
now this is what I have...

(for 2 different carriers)

//Telefónica
$curlPost = 'to=' . urlencode($phoneNumber) . '&subject=' . urlencode($from)
. '&text=' . urlencode($message) . '&submit=Enviar';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://216.184.96.114/sms/mensaje.php');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
curl_exec ($ch);
curl_close ($ch);

//PCS
$curlPost = 'telefono=' . urlencode($phoneNumber) . '&nombre=' .
urlencode($from) . '&msg=' . urlencode($message) . '&B1=E n v i a r&B2=B o r
r a r';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://was.intelnet.net.gt/cgi-bin/sms.cgi');
curl_setopt($ch, CURLOPT_REFERER, '
http://www.pcsdigital.com.gt/mensajes.html');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $curlPost);
curl_exec ($ch);
curl_close ($ch);

Thanks
Received on 2005-07-19