Hercules Image Rotator v.1.08 SS

Hercules Image Rotator is a PHP script, which rotates your images/banners with a JPG (JPEG), GIF, or PNG extension from any location. This is instalation guide for PHP pages.

New updates:
This new feature with just one simple change display your images randomly.

Previous updates:
1. Multiple rotators with different dimension and different rotation times on one page and faster displaying on both PHP or HTML instalation.
2. Due to repeated question "Is it possible to instal Hercules Image Rotator on HTML pages?" one solution has been found out.

Please click here if you want to instal Hercules on HTML (HTM) pages.

Copyright (C) 2005 Wangchuk Sonam
Hercules Image Rotator is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Hercules Image Rotator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

For newer version check http://www.phoenix.frihost.net/hercules/read_me.php


1. Multiple rotators on one page with different rotation times
Grabs images/banners from any location
3. Shows three types of images - JPG (JPEG), GIF and PNG
4. Show images randomly or by order

5. You can sets the image/banner dimensions and time to rotate it
6. Uses Flat File (txt file) and does not need MySQL or any other DB
7. Does not need Java or JavaScript enabled


Instruction for users with installed Hercules:

You don't need to extract hercules.zip and replace your old data.txt and custom.php if you don't like to lose it stored information's. From new version of Hercules you need to upload only new rotator.php, display2.php and "datas" folder (empty). Hercules will work fine with your old preferences and data.txt.

If you like multiple rotators on your page just follow instruction for new users from point 1. and leave your old data and seting intact.

Instruction for new users:

Extract hercules.zip in root folder.
In a new subfolder "hercules" find nine files: display.php, display2.php, display_HTML.php, display2_HTML.php, custom.php, rotator.php, data.txt, read_me.htm, GNU License, folder images and folder datas (empty).

1. in datas folder create new txt file. Chose your name for this file e.g. secondrotator.txt and fill data (follow instruction below for data.txt)

2. Open display2.php and in line 4, 5, 6,7 and 8 set your preferences for data, width, height, rotation time and image displaying - random or by order.

With first definition you will tell to Hercules which file he must grab from datas folder. It is not necessary to put full name of data file (security reason) but be careful don't use two names with same part of string e.g.:

fifthrotator.txt and fourthrotator have same string in theirs name. If you use throt for data definition Hercules will always find same data file. We recommend longer definition but not full file name.

3. Save display2.php. Use include function on your page and point on it e.g:

include $_SERVER["DOCUMENT_ROOT"] . "/hercules/display2.php";

1. For more then one rotators just open display2.php and "Save as..." like display3.php, etc. Change preference and include on your page.

2. New feature (image displaying - random or by order) is not very usefull on less number of images.

3. New users don't need to use data.txt. This data file stay intac for old Hercules users but if you like to use it you can. In that case you must define preferences in custom.php.

Instruction below is for data.txt users

Put this script below on your PHP page.

include $_SERVER["DOCUMENT_ROOT"] . "/hercules/display.php";

Next, open custom.php and customize Hercules Image Rotator according to your preferences. You will find additional instructions inside custom.php.

data.txt customization

Data.txt is divided in three columns and separated with | (color is only for effective demarcation). The first column is for images PATH; the second is for the target URL, and the third column is for ALT.

First column for images PATH is most important You don't need to define the other two if you don't want target URL and ALT. A few examples are given below:


If you use hyperlinks for accessing images, don't start the first column with "/". You need to type the full image URL. An example is below:


For target URL, you need to define the second column. A few examples are given below:


If the target URL is a hyperlink, don't start the second column with "/". An example is below:


Also, it is not necessary to define ALT column if you don't want ALT.

For ALT, you need to define the third column. An example is below:

/images/photo1.gif|/somefolder/photos.php|My photos in 2005.|
/images/photo2.gif|http://www.anysite.com/photos.php|Your photos in 2005.|

For a better-looking ALT, it is preferable that the third column ends with "|". Also if you want ALT without the target URL, simply leave the second column empty. An example is given below:

/images/photo1.gif||Phoenix free PHP scripts.|

1. If your images are larger or smaller than the dimensions that you have preset in custom.php, Hercules Image Rotator will produce disproportional images.
2. Optimize your images for faster image downloading.

That’s all, folks. Have fun!

If you use Hercules Image Rotator and would like to help us please rate it, place a link to us on your website or refer to us in one of good webmaster's forum. Thank you!