PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php session_start(); $timeout = 200; if (isset($_SESSION['STARTED']) && (time() - $_SESSION['STARTED'] > $timeout)) { session_unset(); // unset $_SESSION variable for the run-time session_destroy(); // destroy session data in storage } if(isset($_SESSION['status']) && $_SESSION['status'] == 1){ exit("sorry"); } // do somethins and mark session status 1 $_SESSION['status'] = 1; $_SESSION['STARTED'] = time(); var_export($_SESSION);
Show:  
Copy Clear