I have this situation...
I'm posting some variables using CURL to a remote host. Below you can see how my PHP scripts, look like:
Local PHP script:
$url = 'http://somesite.com/something.php';
data = array ('key1' => 'string1',
'key2' => 'string2',
'key3' => 'string3');
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $data);
curl_exec ($ch);
curl_close ($ch);
// Some code to do other stuff.
Remote PHP script:
$string1 = $_POST['key1'];
// If this string exists in a very big folder of text files.
sleep(30);
// Do something with the file that contain the string.
My problem is that the local php script is loading until the remote script finish the execution. My question is, is there any way to POST those variables to that remote host and then just continue the script execution ? Not mandatory using CURL, but I would like a PHP solution. Thanks!