Home »

how to track user logged out or not? when user is idle ?

Question ListCategory: PHPhow to track user logged out or not? when user is idle ?
jamessmith05 author asked 8 years ago
1 Answers
milleranthony7 author answered 8 years ago

By checking the session variable exist or not while loading th page. As the session will exist longer as till browser closes. The default behaviour for sessions is to keep a session open indefinitely and only to expire a session when the browser is closed.
This behaviour can be changed in the php.ini file by altering the line session.cookie_lifetime = 0 to a value in seconds. If you wanted the session to finish in 5 minutes you would set this to session.cookie_lifetime = 300 and restart your httpd server.

Please login or Register to Submit Answer