
The script allows you to create set of files (containing only images
or image and text) that will be selected randomly and load to the upper
(or lower) frame at your site. Files will be changed automatically
after specified amount of time.

Depending on html coding of your site, random file will appear on:
* specific pages
* all pages under certain directory(ies)
* throughout all site

To set up the script please do the following:

1. Create directory on your server where you will keep 
   rotating files. The files will generally look like this:

<html><head>
<meta http-equiv="refresh" 
content="30;URL=http://yourdomain.com/cgi-bin/random.cgi">
</head>
<body bgcolor="ffffff">
<a href="http://www.ahg.com/listcgi.htm">
<img src="http://www.ahg.com/anad.gif" 
Alt="Get Interactive"
Align=Left border=0></a>
This message from file #1
</body>

where 30 is amount of seconds after which file will be changed (you can
set any amount of seconds you wish),
URL="....." - URL to script random.cgi on your server. Everything that goes
after </head> tag is ordinary html.

2. FTP files that you want to rotate to this directory (you can add/remove
files from there any time you wish).

3. Create frame for random images with a tag
<frame src="URL_to_your_cgi-bin/random.cgi">

(If you need any help on how to create frames, please consult Netscape
pages).

4. Open file random.cgi in Notepad or another word processor.
------------------------------------------------------------
! Important: You are going to change this file.
  When you are done do not forget to "Save it As" 
  TEXT ONLY file !
------------------------------------------------------------

 The first line in random.cgi file looks like this:

   #!/usr/local/bin/perl

   This line tells your computer where the perl interpreter is located.
   This path is the same on most of servers (#!/usr/local/bin/perl). 
   However, if you are not sure, you might want to check with your 
   webmaster/service provider.
   Alternatively, in the UNIX shell at the prompt, you can type:

   which perl

   The output will show the correct path to perl on your computer.
   If it is not 

   /usr/local/bin/perl
   
   You should substitute the line 

   #!/usr/local/bin/perl

   by path to perl specific to your server preceeded by #!
   Please remember to save  file as TEXT ONLY after editing

5. Enter path to directory where you will keep your rotating files
   as $root variable.

6. Copy (ftp) random.cgi into your CGI-BIN directory.

7. Change mode of file random.cgi.
   It should be made executable and readable by world.
   To do it telnet to your cgi-bin directory and on 
   the command line enter: 
   chmod 0755 random.cgi

On Windows NT server do the following (if you have not done it yet):

Assosiate extension .cgi with perl in your file manager. 
Your server manual should give you precise steps of how to do it 
on your particular server.

Include perl.exe in the PATH statement in your autoexec.bat
It will look something like this:
PATH  %PATH%;C:\perl5 
   

THAT'S IT. You are set.


__________________________________________________________

If you have problems, please have a look at 
http://www.ahg.com/faqcgi.htm

___________________________________________________________


