Reputation: 3267
How can I check if a user is idle for 10 minutes or more using php?
Is this possible?
Upvotes: 3
Views: 1425
Reputation: 25755
make use of session variable, store timestamp in it. for every request update the timestamp.
Upvotes: 0
Reputation: 91963
Each time the users does something, update a timestamp for that user in a database. To find idle users, query everyone whose timestamp is older than 10 minutes.
Upvotes: 2