Home

HTML/PHP Random Image Rotation - Redux

by David Pankhurst - Friday Dec 31, 2004

I’m pleased as punch - I took my picture rotator php code, added a few more tweaks and twiddles, and submitted it to SitePoint.com? Result? They published it, and now I’m an official SitePoint contributor.

For those that missed the earlier posting, the code was a simple random image rotator script in PHP. What made it unique was:

  • It could be called from an <img> tag, allowing it to be used from regular html (important for jobs where PHP pages weren’t an option).
  • It allowed more than one image per page, without repetition (mostly).

The article adds a bit more to the code (including a PHP-only solution). Besides SitePoint, I’ve also posted it to my site (finally!). The code is free for all, and I hope it benefits you (I ask that you keep the copyright in � and of course think of me when you’ve got a PHP project coming up…)

Leave a Reply




Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 37056653 bytes) in /home/active/public_html/bigbizblog/wp-content/plugins/utopia12/utopia12a.php on line 131