You can do it with a combination of ajax and sessions in php. On the client side you'll have to write some js to so that it grabs the image (through ajax) every X minutes. This would be calling something like getsignature.php.

On the getsignature.php file, you'd check the session to see if the user has requested a new image within X minutes. If he hasn't return a new image and update the timestamp in the session to now. If the request is smaller than X minutes, then simply return the existing image.

1) AJAX: A script, which is scheduled to grab a new image url from a corresponding server-side script every 5 minutes, then DHTML it into the DOM. This is about as simple as AJAX gets.

2) But even simpler : Serve the page with a javascript array of all image urls in the rotation, together with a script scheduled to grab the next (or random) image from the array every 5 minutes. This is self-contained and involves less programming than the AJAX solution.

Personally I would use solution 2 unless there is some reason why the image urls are not known at the time the page is served.

She needs state information. Unless you're using a cookie or session you won't know when the last image was served. Since there is a requirement that the image only be reloaded every X minutes, you'd need to keep the state information. In the session or in the cookie.

Given that Javascript is well equipped with setTimeout and setInterval I can't see that a cookie would be necessary.

My solution does assume that on page refresh a new image rotation would start, with timing independent of the previous page's. But even if you needed to coordinate each page with its predecessor, you could pass state fom page to page without using a cookie or setting a session variable. Remember that parametes can be passed in the request (slightly cumbersome but possible).