$timeoutseconds = 24*60*60*2;
$timestamp = time();
$timeout = $timestamp-$timeoutseconds;
mysql_query("DELETE FROM referer WHERE time<$timeout");