in reply to A value that stays a value (for some time)

The easiest way to do it is to save a random value in a file and refresh this value through a cron job.

As only the cron job is allowed to write a new value you do not get into trouble through race conditions.

Update: Reading through all messages till now, I might have misunderstood your question. If I have it right now, you need a value which stays the same for x minutes PER USER. It looks to me that what you need can be done through a cookie, which you set to expire in x minutes.

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

  • Comment on Re: A value that stays a value (for some time)