cURL keep running after the user close browser

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
fishown
Forum Commoner
Posts: 33
Joined: Sat May 12, 2007 5:35 pm

cURL keep running after the user close browser

Post 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 =]...
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

Post by Peter Kelly »

It should automatically stop, unless you are running it via cronjobs. Have you got proof its still running?
User avatar
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

Post 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().
Post Reply