XSSI Library

Last Second Randomizer
Developed by Ross Olson

The following piece of code will include on of ten different documents that are kept in the 'include' subdirectory. The files are currently named "firstinclude.inc" through "tenthinclude.inc".

The code will pick one of the files to be included in your document based on the last digit of the second that the http request is made.

There is probably a better way to do this. If think of and write one, let me know.

Ross Olson

<!--#config timefmt="%S" -->
<!--#set var="page_num" value="$DATE_LOCAL" -->
<!--#if expr="$page_num = /.0/" -->
   <!--#include virtual="include/firstinclude.inc" -->
<!--#elif expr="$page_num = /.1/" -->
   <!--#include virtual="include/secondinclude.inc" -->
<!--#elif expr="$page_num = /.2/" -->
   <!--#include virtual="include/thirdinclude.inc" -->
<!--#elif expr="$page_num = /.3/" -->
   <!--#include virtual="include/fourthinclude.inc" -->
<!--#elif expr="$page_num = /.4/" -->
   <!--#include virtual="include/fifthinclude.inc" -->
<!--#elif expr="$page_num = /.5/" -->
   <!--#include virtual="include/sixthinclude.inc" -->
<!--#elif expr="$page_num = /.6/" -->
   <!--#include virtual="include/seventhinclude.inc" -->
<!--#elif expr="$page_num = /.7/" -->
   <!--#include virtual="include/eighthinclude.inc" -->
<!--#elif expr="$page_num = /.8/" -->
   <!--#include virtual="include/ninthinclude.inc" -->
<!--#elif expr="$page_num = /.9/" -->
   <!--#include virtual="include/tenthinclude.inc" -->
<!--#endif -->
   

A printer-friendly version of this article is available.
This site hand-coded for your protection.