RE: [PHP] user login idle timeout feature
| From: | electroteque | Date: | Mon, 02 Jun 2003 09:06:47 +0000 |
| Subject: | RE: [PHP] user login idle timeout feature | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149772@lists.php.net to get a copy of this message | ||
thats what i was thinking of logic but i may be having about 10 users logged
in doing full text searching on a 200 meg + database will that affect it ?
-----Original Message-----
From: Justin French [mailto:justin@indent.com.au]
Sent: Monday, June 02, 2003 11:21 AM
To: daniel@electroteque.org; php-general@lists.php.net
Subject: Re: [PHP] user login idle timeout feature
off the top of my head...
have a column in your user table called "last_active"... it should hold a
date-time, or a unix timestamp, or something like that.
on each page request by a logged in user, you would update that value with a
newer stamp
on physical logout, you would set that to zero or null.
on login, you would check that the value is either zero, or that there has
been at least "X" seconds/minutes passed since the user was last active.
if a user tries to log-in whilst still "active", you'd need to tell them
what happened, explain there's a wait time, or get them to force-logout via
an email sent to their member email address or something.
justin
on 02/06/03 10:38 AM, daniel@electroteque.org (daniel@electroteque.org)
wrote:
> ok so i worked out the connection_status and connection_abort will only
> work if the script is actually running and a request to the server , so i
> wont be able to tell if someone had closed the browser or not , what i'd
> like to know is , how can i tell if a user has not accessed the script for
> a certain ammount of time , i need this to calculate the idle time to
> prevent multiple logins , although a static idle time will let a multiple
> login after that and then the first login will get kicked , any ideas ?
>
>