|Ratings|| ||Unique User Downloads|| ||Download Rankings|
| 60%||Total: 952 This week: 3||All time: 3,751 This week: 70|
This class can get the number of users that are online in a site.
It can traverse the directory where PHP saves user session data to find the currently active sessions.
The class returns the number of users that have accessed the current site for the last 3 seconds.
|Many PHP applications use sessions to keep track about the users that access a site.
This class provides a means to count the number of active users on a site by accessing session tracking files and counting the active sessions based on the last time a session file for an user was modified.
Every online counter need a database, This class will not use a database, SQL or NoSQL or even flat-file.
It will use PHP session file located in
It will return integer of total number of online users from last IDLE TIME ago.
To change IDLE TIME you can set `MAX_IDLE_TIME` to your preferred interval
In order to get more accurate number, you need to edit at least one of session key value pair in every page visit
In shared hosting environment, `session.save_path` need to be changed, do not use default path, because it returns a count of all sessions on the server for all sites
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.