<?php $server = "localhost"; //your server $db_user = "root"; //your mysql database username $db_pass = "password"; //your mysql database password if any $database = "users"; //the db name $timeoutseconds = 300;//timeoutseconds limit //get the current time $timestamp = time(); //calculate the lowest timestamp allowed $timeout = $timestamp-$timeoutseconds; ?>