Here's what I would do - this allows somebody to do their thingy once, then makes them wait at least 24 hours to do their thingy again...
Database table:
lastdone
ts integer not null,
login varchar unique not null
<?
$since=246060;
$sql="SELECT count(*) from lastdone
WHERE ts>$since";
$result=pg_query($sql);
if (pg_numrows($result)>0)
die ('You cannot proceed');
$now=mktime();
$sql="INSERT INTO lastdone (
login, ts)
VALUES
('$login', $now)";
pg_query($sql);
// go ahead and do whatever.
?>