Re: executing a script on browser exit?
| From: | Kevin Beckford | Date: | Thu, 31 Aug 2000 20:18:01 +0000 |
| Subject: | Re: executing a script on browser exit? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14675@lists.php.net to get a copy of this message | ||
a) Use a database
b) look up register_shutdown_function
----- Original Message -----
From: Craig Simons <csimons@cdwebstudios.com>
To: <php-general@lists.php.net>
Sent: Thursday, August 31, 2000 3:58 PM
Subject: [PHP] executing a script on browser exit?
> Hello all! I've only recently picked up PHP, but I'm starting to gett the
> hang of it. My question is this: is there any way to execute a script when
> the user leaves the site or closes the window? My current design sets a
> cookie that tracks the number of pages per session that a user views. When
> the user exits the site, I would like to write that number to a file. I'm
> sure I could do the same thing by reading/writing to file every page, but
> that seems like quite the waste of system resources. Does anyone have any
> ideas or design alternatives?
>
> - Craig Simons
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>