Re: Unique Session Question
| From: | Alain Fontaine | Date: | Sat, 20 Jan 2001 20:37:35 +0000 |
| Subject: | Re: Unique Session Question | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35842@lists.php.net to get a copy of this message | ||
Hi,
How about this: Save the "last action time" as a session variable. Whenever
the user hits a page, check that session variable against the current time.
If the "last action time" is more than 5 minutes older than the current
time, log them out/unset session variables.
Should work I guess.
""Randy Johnson"" <programmer@jennybug.com> a écrit dans le message news:
NEBBKFPIGHBNAMPIDBMNCEINCGAA.programmer@jennybug.com...
> Hello,
>
> I plan to use session variables to identify if a user is logged in... I
> know there is an option to set the life of the session but I am looking
for
> a way to end the session five minutes after they have did there last
> "transaction" with my site...
>
> I don't want people that are actively using my site to be logged out after
5
> minutes just the folks that are sitting idle...
>
>
> Any ideas,
>
>
> Thanks
>
> Randy
>
>
> --
> 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
>