How to Randomly Rotate Header Graphics

ADVERTISEMENTS

By randomly rotating the header graphics, you can add a fresh and dynamic feeling to your site. The header graphic of this site is randomly loaded too.

Here’s how you do it:

First prepare all the headers graphics you want and put them into a folder. Name the folder to something like headers. You will now need to place a rotator script in that same folder.

Download the rotator script from here and rename it to rotator.php.

Now place rotate.php in the headers folder.

Upload the headers folder on your webserver. You can then see your rotating images in-action by defining the script as the source of your image, like this:

Replace www.example.com to the path you have placed the header folder in your webserver.

That’s it. Just sit back and enjoy your randomly rotating header graphics :smile:

banner

Search JohnTP.com or view a random post

To receive this blogs articles for FREE on your email inbox, just enter your email address below and click 'Go':

Enter your email address: or .

Find out what I am doing currently by .

3 responses so far,

  1. 1

    Kev

    November 30, 2006 at 12:33 am

    Hi there.
    Not sure if you can help?
    I have uploaded ten pictures/graphics as well as the rotator.php but not sure what is meant by the following and where exactly the header file has to go.
    Could you please explain in non techie talk what I do next, any help much appreciated.

    You can then see your rotating images in-action by defining the script as the source of your image, like this:

    Replace http://www.example.com to the path you have placed the header folder in your webserver.

  2. 2

    Kev

    November 30, 2006 at 1:12 am

    I now have the images and file on the server but not sure where to put the code below?

    When I hit refresh the images change ok so I assume it is working, again any help much appreciated.



Copyright ©2005-2008 JohnTP, All rights reserved.