Mythic Beasts

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

  1. 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
    %
  2. Rename one of your html files so that it has an .shtml extension
  3. Add the following to that file exactly as follows:
    <!--#include virtual="/include/randtext.pl" -->
  4. 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

  1. 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
  2. Rename one of your html files so that it has an .shtml extension
  3. Add the following to that file exactly as follows:
    <!--#include virtual="/include/randimage.pl" -->
  4. 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

  1. 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
  2. Rename one of your html files so that it has an .shtml extension
  3. Add the following to that file exactly as follows:
    <!--#include virtual="/include/randurl.pl" -->
  4. 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.