I have a login script that passes data to another script for processing. The processing is not related to the script login, but it performs data validation and logging for internal analysis.
I use cURL to pass this data, but cURL is waiting for a response. I do not want to wait for an answer, because it makes the user wait until the analysis is completed before they can log in.
I know that the request may fail, but I'm not too worried.
Basically, I want it to work as a multi-threaded application where cURL is used to fork the process. Is there any way to do this?
My code is below:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,'http://site.com/userdata.php?e=' . $email);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$html = curl_exec($ch);
curl_close($ch);
That's all. But for now, he has to wait for the cURL request to get a response.
Is there a way to make a request for a receipt and not wait for a response?