Random Banner Rotation
Thursday April 13, 2006
Showing a random image or random banner advertisement on your website is much easier than you might think. We first assign each banner a number and then generate a random number using rand (). We then display the banner that corresponds to the number generated by rand (). You can store more than just the banner, but also link URL, alt tags, or any other information you may want, as long as you keep it assigned to the same number.


I didn’t realise it was this easy. I assume the same principle applies to random quotes?
You can handle any random content the same way.
The big advantage of doing the random selection server side before delivering the page rather than client side in Javascript (as many people do) is that the server side solution always works, the Javascript solution relies on Javascript being enabled in the browser.
the link to download the full script appears to be broken (frustrating because this is exactly what I am trying to do at the moment
)