RE: [PHP] pulling script in interval of second.

From: Date: Tue, 01 Jul 2014 00:21:31 +0000
Subject: RE: [PHP] pulling script in interval of second.
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-323567@lists.php.net to get a copy of this message
> You will have to make the script 2 parts. One to reload and the other to > execute the else (exiting). You need to use ajax to call the php script > every > second (for the first part) and use the page's onunload method to execute > the second part (user exited): > > > http://www.w3schools.com/jsref/event_onunload.asp I already tried your method with onunload, the problem with onunload when I change the page the script getting execute. I already have javascript to pull php script, just I need php script doing the flowing; when javascript stop pulling php script. Block in if statement should run. Can you give me php script ? please. > On Mon, Jun 30, 2014 at 7:56 PM, hadi <almarzuki2011@hotmail.com> wrote: > > > I have javascript to pull my php script every interval of second. > > > > When javascript stop pulling my php script, block in if statement > > should execute. > > > > Can someone provide me with the php script please ? > > > > Thank you. > > > > > You will have to make the script 2 parts. One to reload and the other to > execute the else (exiting). You need to use ajax to call the php script > every > second (for the first part) and use the page's onunload method to execute > the second part (user exited): > > > http://www.w3schools.com/jsref/event_onunload.asp

Attachment: [application/pkcs7-signature] smime.p7s
« previous php.general (#323567) next »