You are here: Re: number of logins « PHP Programming Language « IT news, forums, messages
Re: number of logins

Posted by BKDotCom on 12/27/06 17:51

hughie wrote:
> Anyone know a way to have a site list the usernames of those logged in?
> It could be done by writing to a db when a session is started and
> ended but it would be nicer if there is some global session that I can
> go through an array of users. Is that possible or is it against the
> whole spirit of sessions?

poll the db for active users.
perhaps your DB could have a meta-data table/row
update an "active_num_users" each time someone logs in/out
either a straight-forward increment/decrement or actually test for
"active/non-idle" users.
of course to track that, you'd need to also store not-only when someone
logs in, but their last activity (ie, each time they load a page)

 

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

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