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


Can I use curl to send a POST/PUT and not wait for a response?

From: Louie Miranda <>
Date: Wed, 6 Feb 2008 15:36:19 +0800

I have read the FAQ

*But, this is what i need*. I posted this on php-general, but could not get
a good response yet. And I was hoping someone from this list could help me
out better on cURL.

*This is the details/steps of my application:*

   1. file: connect - I connect via a cURL to a URL and sends two
   parameters (application, just wait for a response) -- this is intentional
   2. file: connect - Receives a reply/response of the two parameters
   that i had just sent (data i just sent, was sent again back) -- intentional,
   for security purposes. Initiate and confirm only.
   3. file: connect - sends a XML post to the remote URL (remote URL,
   closes the connection and application)

*What i did on the code was..*

   1. first lines added $varIdResponse = $_POST['id_response'], etc
   2. if (!empty($varIdResponse)) {
   Do send step 3 (on top), send the XML. Access a function_call()
   3. After the if and else. Do step 1, connect and initiate

Right now the only problem i am getting is when i reply back to the server
on step 3. It is denying me. Step 1 and step 2, initiates and confirm i am
the requester. But, once i reply back NEW connection. It don't recognize me?

I probably missed something about the cookie.

If in anyway you think cURL could not do this, could you redirect me to the
right path? We have API's working for .NET and JAVA. But, on my task for
PHP. I could not find a better solution.

I do hope their is a solution.


Louie Miranda (
Security Is A Series Of Well-Defined Steps
chmod -R 0 / ; and smile :)

Received on 2008-02-06