Random Image
Added: 09 September, 2006
Downloads: 1072
Required: php
Ratting: 3.5
Downloads: 1072
Required: php
Ratting: 3.5
This php script loads images from a specified directory randomly. This is a good thing to rotate banner ads. All the thing that you need to is just to keep your images in the directory. And this script will pick up one image each time randomly when it is executed.
Installation:
- Upload the script to your server.
- Open the script with notepad and change the url to your folder in line 3
- Start keeping your images in the specified directory and the script will do the rest. :D
Adding image in webpage:
To add random image in your page, use html image code. And use this php script as the source of image.
<img border="0" src="random_image.php">
And don't forget to change the url to php file.
Image Format:
Your images should only be in either .jpg, .jpeg or .gif format. Others are
not allowed.

Featured Items in php