Transfer to git

This commit is contained in:
2026-02-03 19:37:38 -03:00
commit 9ffbd90a82
136 changed files with 5798 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
ini_set('session.use_only_cookies' , 1);
ini_set('session.use_strict_mode' , 1);
session_set_cookie_params([
'lifetime' => 1800,
'domain' => 'ethernal.win',
'path' => '/',
'secure' => true,
'httponly' => true
]);
session_start();
if ( !isset($_SESSION["last_regen"]) ){
session_regen();
} else {
$timeout_m = 60 * 30; // 30 minutes
if ((time() - $_SESSION["last_regen"]) > $timeout_m) {
session_regen();
}
}
function session_regen() {
session_regenerate_id();
$_SESSION["last_regen"] = time();
}