serving up images

From: Date: Wed, 27 Aug 2003 15:04:49 +0000
Subject: serving up images
Groups: php.db 
Request: Send a blank email to php-db+get-30125@lists.php.net to get a copy of this message
I have about 25 or so images that I would like to serve up on my site's home page. I would like the image to change every 3 days or so. Does anyone have a hint as to how I might go about doing this in a simple fashion? I don't want it to be random, but I do want it to cycle through the images and then start over again. Some initial thoughts: I could just set up a custom index rather than a simple series (1,2,3...). I could then serve up the image that matches the current day of the month or matches a day range. But this gets tricky because I don't have exactly 31 images, and there are obviously shorter months. AND, I want to be able to enter more images without breaking the code. I could do it randomly, and also store an "exclusion list", so every three days, my page gets a new random image whose index is not stored in this exclusion list. This seems like the most likely approach, but sounds like extra work. Any ideas? tnks -------- Matthew J. Horn Principal Spielboy.com

« previous php.db (#30125) next »