Search
 
SCRIPT & CODE EXAMPLE
 

PHP

set session expire time in php

if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 1800)) {
    // last request was more than 30 minutes ago
    session_unset();     // unset $_SESSION variable for the run-time 
    session_destroy();   // destroy session data in storage
}
$_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp
Comment

PREVIOUS NEXT
Code Example
Php :: php read csv to array 
Php :: php check undefined offset 
Php :: how to change existing migration laravel 
Php :: deactivate auto update wordpress plugins 
Php :: installing apache mod php 
Php :: laravel datatable format date column 
Php :: minus day from carbon date 
Php :: how to change date formate in laravel 
Php :: php declare strict_types 
Php :: remove foreign key constraint laravel 
Php :: blade if 
Php :: Laravel Error Log, How to check Error Log in Laravel 
Php :: Flutter migrate to Android Studio mac os 
Php :: php empty object 
Php :: how assign default value to laravel migration column 
Php :: send value from one page to another in php 
Php :: lluminate/contracts[v5.6.0, ..., 5.8.x-dev] require php ^7.1.3 - your php version (8.0.10) does not satisfy that requirement. 
Php :: get array key based on value php 
Php :: php sort array by value length 
Php :: store image to s3 laravel 
Php :: laravel drop table column 
Php :: get id php 
Php :: laravel iteration 
Php :: use php variable in html attributes 
Php :: php datetime sub minutes 
Php :: php iterate thru object 
Php :: PHP file reading modes with explaination 
Php :: types of controller in laravel 
Php :: php cut string 
Php :: php if mobile 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =