You are here: Re: Checking to see if a user is logged in « All PHP « IT news, forums, messages
Re: Checking to see if a user is logged in

Posted by Rik on 04/22/06 12:15

tomhawkins1@gmail.com wrote:
> My current log in script saves various bits of data to a session
> (including a user id). I need to find out via an admin script which
> users are currently logged in ie their $_SESSION['theuserid'] exists
> in any of the existing sessions.

I've created a table called "active users", which holds the information of
recently logged in users & time of last page-request. Time-out is now set on
15 minutes, depends an what kind of site you have wether is has to be lower
or higher.

Usesr have to be authenticated on every page-refresh, so it's pretty simple
update the time of the last page-refresh and to delete entries where the
last page-refresh was >15 minutes ago in the same go.

A nice example of a login script I've rummaged through to get some ideas (it
wasn't exactly what I needed, but has some nice solutions) is
http://evolt.org/PHP-Login-System-with-Admin-Features by jpmaster77

Grtz,
--
Rik

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация