Hey mate looks like quick search will find heaps about this check this out
PHP Session timeout
first, store the last time the user made a request
<?php
$_SESSION['timeout'] = time();
?>
in subsequent request, check how long ago they made their previous request (10 minutes in this example)
<?php
if ($_SESSION['timeout'] + 10 * 60 < time()) {
// session timed out
} else {
// session ok
}
?>
2
solved How to take md5 of a file in php? [duplicate]