I have to run curl right after submitting and saving post data into database. When the form data is saved i run curl and redirect to form again.
Is it possible to redirect without waiting for curl to complete? Because in my case curl may take more then a minute.
Regards.
You could make use of an
exec
forkThe
/dev/null 2>&1
& does not log anything and the>
after yourcurlscript.php
means it wont wait for anything.I think the best solution is to call the page without cURL, using just javascript in async mode (for example - but depends on which kind of project are you working to).
For example
Pay attention that in this way you'll not be notified of errors while storing the data...