• Welcome to Valhalla Legends Archive.
 

Current users viewing your page

Started by warz, July 24, 2006, 10:15 PM

Previous topic - Next topic

warz

What are the various methods for creating a PHP script that displays which current logged in users are viewing your page? Are sessions the only method? I want to try to avoid sessions.

Spht

Quote from: warz on July 24, 2006, 10:15 PM
What are the various methods for creating a PHP script that displays which current logged in users are viewing your page? Are sessions the only method? I want to try to avoid sessions.

I keep a database of IPs of all visitors for the past 5 days, along with the date/time they first visited and their last action (all pages are generated from a single file so last action is updated whenever they view a page on the web site).

From this I can track "unique" visits (by IP, five day accuracy), compute an average daily visit count (based on the past 4 days), and active viewers (if last action was <= 15 minutes ago).

The SphtBotv3 and ClanGnome web site use this system, which I wrote in ASP.