12345678910111213141516171819202122232425262728293031323334 |
- <?php
-
-
-
- if(!isset($_SESSION)){
- session_start();
- }
-
-
- if(!isset($_SESSION["last_activity"]) or (time() - $_SESSION["last_activity"]) > 1800){
- session_unset();
- session_destroy();
- $_SESSION = array();
- header("Location: /?error=session_expired");
- die();
- }
-
-
- else{
- $_SESSION["last_activity"] = time();
- }
-
-
- if((time() - $_SESSION["created"]) > 1800){
- session_regenerate_id(true);
- $_SESSION["created"] = time();
- }
- ?>
|