You
Are Here: Home
> Resource
Articles > Site
Development > Article

|
Untitled Document
Top
Picks for
Tuesday, 02 Dec 2008
|
The
Random Image Rotator
The
Image Rotator is an easy way to make an image on your website
change every time a visitor reloads the page. The Rotator picks
a randomly selected image from a folder you specify and displays
it to your visitors.
The
script figures out which image files are available for rotation
all by itself, so you're free to add or remove images as you please,
without the need to edit the script or a configuration file.
Instructions
To
start using the Rotator, just follow the steps below.
Check
the Requirements
In
order to use the Rotator, your site must be hosted on a server
that supports PHP (version 4.2 or newer). If you're unsure, it's
best to ask your hosting provider if they have PHP before you
move ahead.
Download
the Source
Download
the latest
version of the script and unzip the file (it should decompress
into a file named rotator.php).
Upload
the Script
To
start using the Rotator, just upload the script to your server
using your favorite FTP program. Put the script in the same folder
as the images you would like for it to rotate.
Note:
If you'll be placing the script in another folder, you'll need
to modify the $folder setting in the configuration section before
you upload (read the Instructions section in the script for more
information).
Test
It
The
easiest way to test if the script is working is to open it in
a web browser. Just enter the path to the script in your browser's
Address field, for example: http://example.com/images/rotate.php
Link
It
You
can now link to the file as you would any normal image, like this:
<img src="http://example.com/rotate.php">
Each
time you reload your webpage, the image will change.
For
More Information
To
learn even more about the Image Rotator, check the
article written by Automatic's founder, Dan Benjamin for A
List Apart Magazine.
Use
of this software implies that you have read and are bound by the
License
Agreement.
Extracted
from Automatic.

| Hot
Recommendations |
 |
|
| Internet
Mastery Center Blog |
|
|