cPanel Hosting by
  • Free PHP Scripts »
  • Random Image rotator
  • Bookmark and Share

Random Image

Script name: RandIm - random image script
Current version: 1.0
Price: FREE

Download Now

Random Image Rotator

RandIm is a simple PHP random image rotator script. Use it to display random images from a folder of your choice. Showing a random picture on your website can be as simple as placing such code on your page:

<img src="randim/randim.php" alt="Random photo" />

But not only random images! RandIm supports file extension filtering so it can be used to randomly pick other file types too! You can easily set it up to work as a random file download link.



  • displays a random image from any folder on your server,
  • can be set to work with random files instead,
  • you can setup allowed file extensions so it can choose only certain file types from a mixture of files,
  • can be used as an URL (image sec or a href) or as a PHP include,
  • supports changing settings on-the-fly (use one copy of the script to choose files from different folders),
  • ... and much more!,
Download Now »


  • PHP 4.4 or newer

RandIm has been tested on servers under Linux, Windows and FreeBSD operating systems. It should work on any server with a working installation of PHP.


See RandIm displaying random images from two different folders:

Random Image Demo

Try refreshing the test page to see how images rotate.


Rate PHP Random Image script!

If you like this script please rate it or even write a review at:

Rate this Script @ Hot Scripts

Rate this Script @ The PHP Resource Index



Do you like this free script?

In exchange please place a link to to your website. It can be as simple as a text link or choose one of the banners available here. Thank you!


Be notified of future updates!

Join PHPJunkyard low-volume newsletter to be notified about new scripts, new versions of the existing scripts and other important news. Subscribe here

Dedicated Servers by