Page 1 of 1
cURL keep running after the user close browser
Posted: Tue Feb 08, 2011 11:58 pm
by fishown
Hello everyone =],
I couldent find how to stop my PHP/cURL script if the user is closing the browser ...
Is it possible?
Thanks =]...
Re: cURL keep running after the user close browser
Posted: Wed Feb 09, 2011 7:10 am
by Peter Kelly
It should automatically stop, unless you are running it via cronjobs. Have you got proof its still running?
Re: cURL keep running after the user close browser
Posted: Wed Feb 09, 2011 9:01 am
by John Cartwright
As far as I know, you cannot abort in the middle of an IO operation.
EDIT | The notes on ignore_user_abort() say
PHP will not detect that the user has aborted the connection until an attempt is made to send information to the client. Simply using an echo statement does not guarantee that information is sent, see flush().