I am seeking a method to count logged users by counting the sessions or any …, is there any way to do it without using a database, and also eager to know a method to make to throw an event before and after session expired.
Thanks in advance
Count Session and Trigger Events
Moderator: General Moderators
Re: Count Session and Trigger Events
There is no reliable way. Use a database. Seriously.
For events, PHP runs when it's told to run. And it doesn't provide any kind of onSessionDestroyed event for you to listen to.
If you want that much control, make your own session handler and add events there. You won't quite get the ones you want, but you'll be able to do something.
For events, PHP runs when it's told to run. And it doesn't provide any kind of onSessionDestroyed event for you to listen to.
If you want that much control, make your own session handler and add events there. You won't quite get the ones you want, but you'll be able to do something.