PDA

Click to See Complete Forum and Search --> : getting the number of users on site


Magiaus
Mar 28th, 2004, 06:02 PM
I want to put a small panel about site states in the admin panel for the site I'm working on. One of the things I want to have in the site state panel info box is number of users currently browsing site. Is there a better way to do this then using the session. I know that doing ++ and -- on session_start and session_end will do this for me, but last time I checked the session doesn't end for around 20 minutes after the user has left the site. I can live with that but if there is a better way I'd rather be precise.

Anybody know, of anything better?

Thanks. :cool:

nemaroller
Mar 29th, 2004, 05:09 PM
No.

The whole architecture is disconnected. IF someone opens your website main page, and then goes to the local convenience store to buy some Dove bars, and then comes back and continues browsing... (all under 20 minutes).. is he really currently using your site?

Or if he/she leaves your site for one minute, then comes back to it.... is it still the same session? It is, since the IP/MAC combo will give them the same sessionid back(if the session hasn't timed out). But they weren't currently using it for that one minute.

The best you can get is an approximation dependent on your session timeout.

Magiaus
Mar 30th, 2004, 09:06 AM
Okay that's what I thought. To bad there is not a last request field or something on the session.