Random or Sequenced line of HTML
This is a fairly simple tool which allows you to generate witty
sayings, random advertisements, or any other piece of HTML that you
want to change between "hits" on a page.
Using this tool is very simple. You need to create a file that has the
"random" lines of HTML in it. The gadget will pick ONE LINE from this file.
The name of the file will be the name of the page, but with the
".html" or (".htm") extension changed to ".rnd" (i.e. the random text for the
"index.html" page would be in "index.rnd")
The magic line to include in your HTML page is:
<!--#exec cgi="/cgi-bin/random" -->
or
<!--#exec cgi="/cgi-bin/sequence" -->
The difference between the above two lines is that the sequence gadget will
sequentially step through the file on each hit, as where the random will
just pick a line at random.
There are two supported formats for the random text file: the
Islandnet format, and the generic format. The Islandnet format places
the number of random lines in the first line of the file. The generic
format doesn't use this header line.
Here is an example of the Islandnet format:
4
<B>Line</B> 1
<i>Line</i> 2
<Img src="/images/bmdcomp.gif"> 3
Honk if you love peace and quiet!
Here is an example of the generic format:
<B>Line</B> 1
<i>Line</i> 2
<Img src="/images/bmdcomp.gif"> 3
Honk if you love peace and quiet!
There is no difference between the two formats from the server's point
of view. For simplicity, we recommend you use the generic format.
Here is the example output:
Honk if you love peace and quiet!
(You'll note that we're using the /cgi-bin/sequence version in this page.)
|