I have a PHP web application where user can login and logout (Session start and cookies are set) and access some pages. Now, I have to show the list of currently logged in users to the admin. But after searching on google I am unable to understand the proper and safe way to do this job.
Here is currently my thought and its limitations.
But the problem with the above approach is , it is not necessary that every user logout. So I cannot determine the true logged-in users!!!
Do there is any smart approach exists that truly inform me about the currently logged in users.??
You can put a definition on what constitues a logged in user - for isntance if user was active in some period of time. Then you can log user actions, and see if given user have any actions logged for given period of time.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.