Random Image Rotator Working Again


It's the Week of Things Working Again. First the Flickr albums via FAlbum, and now the rotating banner image, via "Automatic Rotator."

It's a simple php script that you put in a directory of images, then every time it is called, it spits out a random image file from that directory. I modified my css file to point the background of the banner div to that script, so every page view automatically gets a random image. To add a new image to rotation, I just drop it in the directory.

Again, if you don't feel like hitting command+R a couple dozen times to see them all, just hit the handy dandy Banner Image Lister - another simple script that dumps out all files in a directory (including the rotator.php, which will appear to duplicate one of the images at random, and the index.php file itself, which will appear as a broken image).

Thanks to Cole for some gentle nudging to get me to put this together, and thanks to Automatic Labs for putting Rotator together.


See Also