Re: Detecting user logout.
| From: | tonyz | Date: | Tue, 02 Oct 2001 18:11:08 +0000 |
| Subject: | Re: Detecting user logout. | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69615@lists.php.net to get a copy of this message | ||
why bother charting logouts. use cookies that expires so you know that
they will eventually lose access and need to login again.
just a thought
tonyz
Henrik Hansen wrote:
>
> a@deruwe.be (Alexander Deruwe) wrote:
>
> > Hey all,
> >
> > I keep track of my users using PHP4 sessions, with verification against a
> > PostgreSQL database.
> >
> > How can I detect when a user logs out / is logged out? I provide a hyperlink
> > 'Logout' which users are supposed to click, so I can obviously check there.
> > My main concern however is that people won't really use that link, but just
> > close their browser.. Which means my table with logged in users will never
> > get properly updated. Any ideas are appreciated.
>
> when the user surfs your pages you update their logged in timestamp
> then it's always updated with the last time they were asctive on your
> page, then you setup a cronjob or something else to check weather or
> not the users has been active in a given interval like 1 hour. This
> method will still have somekind of uncertainty. I still think there
> are many other ways (better?) to do it.
>
> --
> Henrik Hansen