Re: close the browser

From: Date: Tue, 24 Jun 2014 16:39:49 +0000
Subject: Re: close the browser
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-323528@lists.php.net to get a copy of this message
On Tue, Jun 24, 2014 at 12:26 PM, Stuart Dallas <stuart@3ft9.com> wrote: > On 24 June 2014 17:16, Aziz Saleh <azizsaleh@gmail.com> wrote: > >> On Tue, Jun 24, 2014 at 12:08 PM, hadi <almarzuki2011@hotmail.com> wrote: >> >> > Hi, >> > >> > Is there's any way to run script when user close the browser in php ? >> > >> > Thanks . >> > >> > >> > >> Yes: >> http://www.php.net//manual/en/function.ignore-user-abort.php >> > > That's detecting a client disconnection, not the browser being closed. > While closing the browser will also close the connection, it's not the only > action that will do so. > > -Stuart > > -- > Stuart Dallas > 3ft9 Ltd > http://3ft9.com/ > Stuart: Here is what I can think of: 1) User closes the browser. 2) Internet is disconnected. 3) Computer shuts of. 4) Intermittent connection. I could be missing a few (if so, please let us know which). Either way, they all are pretty much connection lost which I am 90% is what the OP was thinking of (probably didn't think of a way to do something for the other cases).

« previous php.general (#323528) next »