Just have a function that handles the randomization, which only executes if a certain number of seconds has passed since the last time the function was called. A generic example:
function timed_rand ()
{
$last_time = // Get the old time from some place, i.e. a DB
$curr_time = time();
if ($curr_time > $last_time)
{
$rand_val = // calculate your rand() value
// Store the current time () in the DB or flat file
return $rand_val;
}
}
You could just do your comparison in the database, too.