Random Text/Images/URLs
There are three scripts provided with the system CGI which allow
you to add changing pieces of text, changing images and changing urls.
Each one is just one line and reads from a file in the same directory
as the webpage that calls it
Using the random text item
- Create a file called random.txt, in the same directory as the webpage you
wish to use it on, with the following format:
Text
More text
%
Text 2
More text 2
% - Rename one of your html files so that it has an .shtml extension
- Add the following to that file exactly as follows:
<!--#include virtual="/include/randtext.pl" --> - Upload the file and check it works by pointing your browser at that page.
This text will be replaced by one of the random pieces of text or html.
Using the random image item
- Create a file called randomimages.txt, in the same directory as the page
you want to use it on, with the following format:
/pics/image1.gif
/another_directory/image2.jpg - Rename one of your html files so that it has an .shtml extension
- Add the following to that file exactly as follows:
<!--#include virtual="/include/randimage.pl" --> - Upload the file and check it works by pointing your browser at that page.
This text will be replaced by one of the random images.
Using the random url item
- Create a file called randomurls.txt, in the same directory as the
webpage you want to use it on, with the following format:
http://www.mythic-beasts.com/,The nice people I host with
http://www.google.com/,A search engine - Rename one of your html files so that it has an .shtml extension
- Add the following to that file exactly as follows:
<!--#include virtual="/include/randurl.pl" --> - Upload the file and check it works by pointing your browser at that page.
This text will be replaced by one of the random URLs and descriptions.
Copyright © 2000-2008 Mythic Beasts Ltd. All Rights Reserved.

