Reputation: 496
I am developing a php application. Is it possible to get active sessions and session values on my server? And is it possible to end up a particular session?
Upvotes: 0
Views: 4771
Reputation: 4048
Currently in PHP you cannot get the active sessions directly. But, you can create your own session handler ( http://pt2.php.net/manual/en/function.session-set-save-handler.php ) and manage the session files.
Upvotes: 1
Reputation: 1803
If you want maximum flexibility with sessions you can save all your sessions in a database. Then it is very easy to get number of sessions, content of any session, kill them, etc...
http://shiflett.org/articles/storing-sessions-in-a-database
As a bonus you will increase the security!
Upvotes: 5