Hi all,
how to track currently logged in users information?
(e.g. Whether user is editing profile, viewing page, deleting profile etc.)
Printable View
Hi all,
how to track currently logged in users information?
(e.g. Whether user is editing profile, viewing page, deleting profile etc.)
You'll need a database. On every page action, simply save their location to the database, as well as the current timestamp. To view active users, just do a SELECT from the table, and drop rows which are older than a certain amount of time (say 15 minutes).
Thanks Penagate
I thought I will have to use session variables or something...
your method is easier than storing data in sessin variables..
Session variables would actually be easier if you could use a trick to view the session data of other users. I've never tried, but it would involve changing the location of the session data files. This wouldn't work on a shared hosting server though, and it'd also a potential security risk. The database method is more reliable.