Re: timing a session
| From: | Matthias Nothhaft | Date: | Sat, 23 Aug 2003 19:36:42 +0000 |
| Subject: | Re: timing a session | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-160535@lists.php.net to get a copy of this message | ||
Damian Brown wrote:
Hi, i haven't looked into it properly yet, but is there a way in PHP of recording the length of time a visitor stays on your website i can record the entry, but i don't know how to record the exit time There is no way to get this exactly!You cannot record the time a user is really reading a single page. It has to do something with the http protocol being 'connectionless'! I heared/read that there's a standard of the 'advertisment-industry' saying that a visit ends after 30 minutes after the last (session-)request. (A bad method if you really must have this very exact is to do a short http-refresh, eg every minute.) I also think, this is no php problem but a common problem of the http protocol which wasn't designed to hold a connection over a user's session - that's why session management had to be invented ;-) Regards, Matthias
Regards, Damian www.phpexpert.org UK FREEphone 0800 019 0924