You are here: Re: User status Online/Offline? « PHP Language « IT news, forums, messages
Re: User status Online/Offline?

Posted by Michael Fesser on 12/19/07 18:23

..oO(macca)

>Facebook shows who's online by identifying which members have been
>active in the last five minutes.
>
>how? I'm not sure? maybe some kind of authentication and reading the
>apache access log? maybe some kind of database table?

You just have to keep track of active sessions. One way to do this in
PHP is to use your own session handler, which stores the session data
and a timestamp in a DB table (or just the timestamp in the DB and the
session data in flat files, whatever you like). Then you just have to
fetch all records that were updated in the past 5 minutes or something
like that.

But even this is just a wild guess and never really accurate. As said,
HTTP doesn't allow for accuracy here:

* user sends request
* user gets answer
* user is gone

It's always the same.

Micha

 

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

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