CasperSecurity

Current Path : /var/www/mvc360.ucnms.co.in/v.2.0/web/connection/login/
Upload File :
Current File : /var/www/mvc360.ucnms.co.in/v.2.0/web/connection/login/login-authenticateback.php

<?php
// Start the session
session_start();

// Set timeout period (in seconds)
$timeout = 600; // 10 minutes

// Check if the user is logged in and the session is active
if (isset($_SESSION['logged_in']) && $_SESSION['logged_in'] == true) {
    // Check if last activity timestamp is set
    if (isset($_SESSION['last_activity']) && (time() - $_SESSION['last_activity'] > $timeout)) {
        // Session expired, redirect to session expired page
        header("Location: ../../../index.php");
        exit();
    }

    // Update last activity timestamp
    $_SESSION['last_activity'] = time();
} else {
    // User is not logged in, redirect to login page
    header("Location: ../../../index.php");
    exit();
}
?>



<script>
    // Function to reset session timeout
    function resetSessionTimeout() {
        // Make an AJAX request to a server-side script to reset session timeout
    }

    // Event listener to detect user activity
    document.addEventListener("mousemove", function() {
        resetSessionTimeout();
    });

    document.addEventListener("keypress", function() {
        resetSessionTimeout();
    });
</script>
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY