Hello everyone =],
I couldent find how to stop my PHP/cURL script if the user is closing the browser ...
Is it possible?
Thanks =]...
cURL keep running after the user close browser
Moderator: General Moderators
-
Peter Kelly
- Forum Contributor
- Posts: 143
- Joined: Fri Jan 14, 2011 5:33 pm
- Location: England
- Contact:
Re: cURL keep running after the user close browser
It should automatically stop, unless you are running it via cronjobs. Have you got proof its still running?
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: cURL keep running after the user close browser
As far as I know, you cannot abort in the middle of an IO operation.
EDIT | The notes on ignore_user_abort() say
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().