How to check if a user is idle on a website using php

How to check if a user is idle for 10 minutes or more using php?

Is it possible?

+3
source share
2 answers

Each time users do something, update the timestamp for that user in the database. To find idle users, ask everyone whose timestamp is older than 10 minutes.

+2
source

use a session variable, store the timestamp in it. For each request, update the timestamp.

0
source

All Articles