Example:
$timeoutseconds = 300;
$timestamp = time();
$timeout = $timestamp-$timeoutseconds;
$dbtimestamp = mysql_db_query("SELECT timestapme FROM table");
if ($dbtimestamp<$timeout) {
...execute code here...
}
$dbtimeout = mysql_db_query("DELETE timestamp FROM table WHERE timestamp<$timeout");
if(!($dbtimeout)) {
print "Timeout Failed > ";
}
something like that...