|
CIRR.COMCIRR Supported CGIRandom Banners |
randomBanner.pl is a Perl CGI that generates a random link to one of a list of sites. The link may or may not include a graphic. For text links, you may define the color of text, the font list, and the size of the text. For graphics you may specify the size of the image (height and width in pixels) and the alignment (left, right, center).Links are selected without replacement until the number of hits for each site are equal. The maximum number of hits is then incremented and another round of selection begins.
<!--#include virtual="/common-cgi/randomBanner.pl?log=LOGFILE&list=LISTFILE" -->LOGFILE is the complete path to the banner log file. The banner log file contains the destination site name and the count of the times the link for that site has been displayed.
LISTFILE is the complete path to the banner information file. This is the file that contains the link information.
- sitename
- The name of the target site. This value is used for text links and for the alt parameter of the img tag.
- url
- The URL of the target site. This must be a completely specified URL, not a relative or virtual URL.
- graphic
- The URL of the image to display for this link. This must be a completely specified URL, not a relative or virtual URL.
- width
- The width of the image in pixels.
- height
- The height of the image in pixels.
- align
- The alignment of the image: left, right or center.
- color
- The color to use for text links.
This can be either a hex value (#ff0000) or a color word (blue).- font
- The font to use for the text link.
This can be a comma separated list of fonts, for example,Monaco,Times. Do not enclose the list in quotes. Remember that this font will be used only if it is available to the browser requesting your page.- size
- The size of the text link.
This is an integer from 1 to 6, with 1 being the largest size.- weight
- Always set this value to 1.
Below is the fragment of HTML and the banner information file used to display the link above.
![]()
<-- The Link
<!--#include virtual="/common-cgi/randomBanner.pl?log=/var/local/httpd/bannerLog&list=/var/local/httpd/bannerList" --> <-- The Link
# banner information file sitename=The Renaissance Faire Junkie%weight=1%url=http://www.faire.net/renfaire-junkie%graphic=http://www.faire.net/banners/renfaire-junkie.gif%width=%height=100%align=%color=%size=%font= sitename=faire.net%weight=1%url=http://www.faire.net%graphic=%width=%height=%align=%color=red%size=6%font=Monaco, Times sitename=CIRR%weight=1%url=http://www.cirr.com%graphic=http://www.cirr.com/logos/cirr-medsm.gif%width=%height=100%align=%color=%size=%font=
| Copyright 2000,2002 Central Iowa (Model) Railroad | Contact Us |
Referral Program |
Support |
| $Id: RandomBanner.html,v 1.3 2002/04/29 23:06:38 cirr Stable $ | Terms of Service | Privacy Information |