I am new to php and am trying to build a website. I would like to logout user session if he is idle for some time. I searched the web but i couldn\'t find the proper code. H
You can config the PHP - configuration for session.cookie_lifetime, this will automatic destroy session after amount of idle time.
More information can be found here http://www.php.net/manual/en/session.configuration.php#ini.session.cookie-lifetime