HEX
Server: Apache/2.4.65 (Unix) OpenSSL/3.5.1
System: Linux bavaria.hybridsync.com 5.14.0-611.41.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Mar 19 03:50:11 EDT 2026 x86_64
User: hdradio (1005)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /home/hdradio/public_html/mobile/session.php
<?php
	// start session
	ob_start();
	session_start();
	
	// set time for session timeout
	$currentTime = time() + 25200;
	$expired = 3600;
	
	// if session not set go to login page
	if(!isset($_SESSION['user'])){
		header("location:index.php");
	}
	
	// if current time is more than session timeout back to login page
	if($currentTime > $_SESSION['timeout']){
		session_destroy();
		header("location:index.php");
	}
	
	// destroy previous session timeout and create new one
	unset($_SESSION['timeout']);
	$_SESSION['timeout'] = $currentTime + $expired;

?>