|
This is silly easy. In your config (or any file thats included in the main script thats setting the sessions) set the sessions dir using a set ini at the top. then do a dir listing on the dir every 30 seconds on a cron or other c app or something (you CAN do it on every load but thats just a server load problem) and count the number of sessions. so long as your php is cleaning up the old sessions quickly, it will return a good number. if you dont have any other sessions apps on your machine (check to make sure in php.ini that its not automatically starting sessions) you can even count the decault dir and not have to set ini it.
|