hello there, i need some advice on how to secure and see who's online, I have created a GUI for an administrator, and I want to install this feature, to see who's online on the index page... the method that i am thinking is when a user is successfuly logged in, then an alteration to the mysql db will be made, for example: $_SESSION['user21'] != "" /* if logged in */ then: status = Online /* this will be the changes in the field (status) and the user status(Online) in the mysql db */ i need some advice on this one, and some advices on security... Thank you In advance... bartolay13
- When a visitor comes to your website and you create a session log that into the database along with the time created/modified - Assuming your session has a time out , lets say 15 minutes. - Each time a user touches a page update the time modified to the current time. - Then to find the users on line you can select from all sessions where the modified time is within 15 minutes. Of course if your site is high traffic you dont want to write to the db for every page load so you can use something like memcached to keep track of the sessions activity for you. Hope this helps
thanks, i created a session log table for the users login and logout. addition to that, what do you mean by memcached?