Re: Setting a timed-session
| From: | Andrew Kreps | Date: | Sat, 02 Oct 2004 00:04:33 +0000 |
| Subject: | Re: Setting a timed-session | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-36537@lists.php.net to get a copy of this message | ||
On Fri, 01 Oct 2004 14:16:44 -0500, Philip Thompson <prthomp@uark.edu> wrote:
> This may be a bit elementary, however, I am confused on the
> functionality of it. I am wanting to create a session that logs out
> after a certain amount of time, no matter if the user is doing
> something or not. I have used the function
set_time_limit(),
> but I
> don't know if I'm using it properly.
I don't know of any functions built into PHP that have the
functionality you're looking for, but you should be able to simply
store an expiry date/time in your user's session, and if the current
time is past that, destroy the session and send them to a 'time
expired' screen.
Have a look at the session specific portion of the manual for some
helper functions. Also, if you're looking for further guidance, you
might want to re-post this question to the PHP-General list, since
your question isn't DB specific.