I have a PHP file that randomly generates an image from a folder on every refresh. I downloaded it from [here (which also has an explanation)](http://www.marcofolio.net/webdesign/php_random_image_rotation.html).

Instead of randomly choosing images, how can I have it change the image hourly? For example, I would like it have the same image for an hour, and then change when that hour is up. Basically, a new image based on some time interval.

Thanks for the help.