Re: Randomizing, sort of
| From: | Marek Kilimajer | Date: | Fri, 13 Sep 2002 19:14:05 +0000 |
| Subject: | Re: Randomizing, sort of | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116302@lists.php.net to get a copy of this message | ||
You may use file access time:
- first, find a file with the most recent atime
- check if(date('d', $atime) != date('d')) , choose another file
- print out the link, as browser retrieves the file, access time is updated
Liam.Gibbs@dfait-maeci.gc.ca wrote:
Don't really know where to start on this. What I need is a banner that displays at the top of the page, chosen randomly by selecting a picture file in a directory. Easy enough. This already happens. But what I need is for the site to select one daily, which means that the same picture will display for the rest of the day. New day, new picture selected randomly. It doesn't change until the next day.