Jump to content

Time-Out sessions


9911782

Recommended Posts

well. you could store an the time in a session. here is some basic code:

[code=php:0]

$timeout = time() - (60 * 5); //60 seconds x 5 minutes.
if($_SESSION['timeout'] < $timeout){
session_destroy();
}else{
$_SESSION['timeout'] = time();
}

 

hopefully i have everything right. its late here...

Link to comment
https://forums.phpfreaks.com/topic/37586-time-out-sessions/#findComment-179766
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.