Refael
asked on
Display current logged users
Hello Experts,
In a php web application with a user login. Also there is a server-side login (protected floder).
The script start with:
==========================
"ob_start();
session_start();
include(/config.inc.php');
session_regenerate_id();
==========================
when i login i see my name but i would like to display all the current logged users.
How is it possible?
Thanks!
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you want to display just the number of logged users you can play a simpler trick: count the files in your PHP's session storage directory. But this trick only works assuming that:
You have read access to your server's session storage directory;
your site has its own separate session storage directory, and
the mechanism for session garbage collection (clearing old session files) is working properly
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks guys, but for newbie its not that easy to follow... an example would have been great to have.
Memcache is an on-memory table, and you can also use MySQL's MEMORY engine.