Search  |  Contact  |  Site Map  |  Print
FastVirtual Web Hosting & Internet Services Customer Care  
Web Hosting  |  Domain Names  |  Web Site Builder  |  Internet Access  |  Support Center  |  About FastVirtual

Random Banners

Display random banners and other
images on your web pages.

The random banner script is typically used to randomly display advertising banners from a preconfigured selection of image files. The script is easy to configure and uses SSI  (Server Side Includes) to display a randomly selected image from a preconfigured list.

A random banner sample is available:

Random Banner Sample

How to Add Random Banners

Follow these simple steps to add random banners to your web pages:

  1. Create your banner data file.
  2. Upload the data file and images (".gif" or ".jpg").
  3. Add the random banner code to your web page.

Create Your Banner Data File

Use Notepad (or similar text editor) to open a new text file and enter details of your banner images, each on a separate line, as follows:

link-url,image-url,border-size,image-width,image-height,alt-text
link-url,image-url,border-size,image-width,image-height,alt-text
link-url,image-url,border-size,image-width,image-height,alt-text

Example:

        http://www.site1.com/,http://www.yourname.com/images/banner1.gif,0,468,60,Visit Site 1
        http://www.site2.com/,http://www.yourname.com/images/banner2.jpg,0,468,60,Visit Site 2
        http://www.site3.com/,http://www.yourname.com/images/banner3.jpg,0,468,60,Visit Site 3

Save the file as "filename.randomBANNER.txt" (replacing "filename" with your preferred name for this random banner group).

Upload the Data File and Images

Upload this file to your "freeCGI" directory, which is one level above your document root ("htdocs"). Use FTP or Webby to upload your file (you cannot access this directory with FrontPage).

Upload your banner images to the location you specified in your data file.

Add the Random Banner Code to Your Web Page

To instruct the server to look for SSI commands, your page should end in an ".shtml" extension. SSI commands will not be recognized if the page has an ".html" extension.

To include the random banners to your web page, simply add the following code to the page body (where "filename" is the name you gave to your random banner data file):

        <!--#include virtual="/cgi-t/randomBANNER?group=filename.randomBANNER.txt" -->

Note: Remember to save your page with an ".shtml" extension.

Web Hosting  |  Domain Names  |  Web Site Builder  |  Internet Access  |  Support Center  |  About FastVirtual  |  Articles  |  Search  |  Contact  |  Site Map
Top of Page FastVirtual, Inc. All Rights Reserved.  Privacy Policy  |  Web Site Usage Terms  |  General Service Agreement