Random_Entry returns a random entry from a structured file.
It can be used for things such as random quote files to add dynamic content to a web page and can be called as a server-side include (SSI) or as a CGI.
There are two parameters that may be passed to it in the query string. 'f' is required.
<!--#set var="data_file"
value="/pub/m/y/myacct/homepage/quotes.random.txt"-->
<!--#include
virtual="/cgi-bin/utils/randomentry?f=$data_file"-->
These can be put on a single "#include virtual=..." line, but the
above is neater.my entry has multiple lines my next entry does, toothen the SSI would look something like
<!--#set var="data_file"
value="/pub/m/y/myacct/homepage/quotes.random.txt"-->
<!--#set var="separator"
value="%0A%0A"-->
<!--#include
virtual="/cgi-bin/utils/randomentry?f=$data_file&s=$separator"-->
If the separator is "\n\n--\n\n", as in
my entry has multiple lines with blank lines inbetween -- my next entry continues in the same fashionthen the SSI would look something like
<!--#set var="data_file"
value="/pub/m/y/myacct/homepage/quotes.random.txt"-->
<!--#set var="separator"
value="%0A%0A--%0A%0A"-->
<!--#include
virtual="/cgi-bin/utils/randomentry?f=$data_file&s=$separator"-->