Re: Batch php to loggoff web site
From: David Mackenzie (me_at_privacy.net)
Date: 11/04/03
- Next message: ZoombyWoof: "Re: Problem with SESSION variables..."
- Previous message: Pedro: "Re: Problem with SESSION variables..."
- In reply to: gf: "Re: Batch php to loggoff web site"
- Next in thread: Eric Ellsworth: "Re: Batch php to loggoff web site"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 04 Nov 2003 15:31:41 +0000
On 4 Nov 2003 06:41:46 -0800, gfraley5@earthlink.net (gf) wrote:
>Martin Lucas-Smith <mvl22@cam.ac.uk> wrote in message news:<Pine.SOL.4.44.0311041140220.2071-100000@red.csi.cam.ac.uk>...
>I know I can alter the cookie expire time and that is an option.
>However, I don't want it expiring while they are in the middle of
>something, so I avoid that. What I want is a way to automatically
>schedule an offline job that will expire the cookie, log off the
>browser, do whatever is necessary so that at 21:00 hours, as an
>example, ALL sessions are timed out.
In your scripts, check if the time is between, say 08:00 and 21:00. If
so, allow the script to continue as normal, otherwise display an
appropriate message and run your logoff function.
If the user has closed their browser or does not refresh the page, you
can't remove the cookie.
Controlling users' login status will be flimsy at best as they're not
actually logged into anything. You only know if the user is "still
there" when they request a new page from the server. They could have
closed their browser, switched off their machine and gone home for the
night and you'll never know about it.
I think the best you can do is the time check above, and setting the
cookie to expire ten minutes ahead. As long as the user is active, the
cookie will keep getting reset. After ten minutes of inactivity the
user will need to log in again. Many sites work like this. And after
9pm the system can't be used anyway.
-- David ( @priz.co.uk ) The Internet Prisoner Database: http://www.priz.co.uk/ipdb/ The Tarbrax Chronicle: http://www.tarbraxchronicle.com/
- Next message: ZoombyWoof: "Re: Problem with SESSION variables..."
- Previous message: Pedro: "Re: Problem with SESSION variables..."
- In reply to: gf: "Re: Batch php to loggoff web site"
- Next in thread: Eric Ellsworth: "Re: Batch php to loggoff web site"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|