I am working on a website that users login to use. I would like to be able to update everyone who is online's account with points when I see fit. If I have 200 accounts active but only 60 people are online I want to update those 60 peoples accounts with a point since they are actually online when I posted an event for them to be logged in for. Any help would be great thank you in advance.
Use a database for session management. Check the timestamp on the last pageview for a particular user. If it's within a certain amount of time ( a few minutes), the user was on the site.
ok that is setup now .... (thank you btw) Now that I have the time stamp saving to the record that is associated with the user how do I call for the people logged in the last 10 minutes: last stored was for Moki time was 10:55:37 mysql_query("SELECT username FROM Users WHERE ????");
Something like this... mysql_query("SELECT username FROM Users WHERE timestamp_column >= DATE_SUB(CURRENT_DATE(), INTERVAL 10 MINUTES));