BareMetal.com

Baremetal
My Account
Domain Registration Management Services
Web Services
Rates and Specs
Bulk Rates
CGI Library
FAQ
Order Form
Tech Support
Billing Info
Company Info
Charities
Legal Info
Employment
Privacy Statement

BM


Web Services

Random;

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:
security problem, stat(/home/tbrown/baremetal/gadgets/random.html) failed (or file is owned by root)

(You'll note that we're using the /cgi-bin/sequence version in this page.)



 
Home Page    Domain Registration Services    Web Services    Technical Support
About Baremetal    Privacy Statement    Billing Info    Charities
My Account    Legal Info    Sitemap    Search BareMetal

Copyright © 1996-2012, BareMetal.com Inc.
Last updated: Thursday, 10-May-2012 09:21:43 PDT
Last Accessed from: msnbot-207-46-195-242.search.msn.com
Questions and comments to support@baremetal.com