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

curl-and-php

Re: Do not wait after a curl post to a site.

From: Kirk Hedden <khedden_at_treefrogcreations.com>
Date: Tue, 19 Jul 2005 09:26:54 -0400

There's not a way to do this, as far as I know.

If you don't care about responses, you can just open a raw socket and send
the data you need. Of course, this might not solve the issue if the server
is the bottleneck.

Alternatively, you may also want to contact your carriers and see if they
have some kind of better system for submitting text messages for automated
systems like yours.

Kirk

At 06:47 PM 7/18/2005, you wrote:
>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')>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')>http://was.intelnet.net.gt/cgi-bin/sms.cgi');
>curl_setopt($ch, CURLOPT_REFERER,
>'<http://www.pcsdigital.com.gt/mensajes.html')>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