Knowledge Base

How to use cPanel's random HTML generator

This article describes how to use the random HTML generator in cPanel's CGI Center to generate dynamic content for your web site. This feature is often used to display quotes of the day, helpful hints, or other text that changes every time a web page is loaded.

Configuring the random HTML generator

To configure the random HTML generator, follow these steps:

  1. In the Software/Services section of the cPanel home screen, click CGI Center. The CGI Center page appears.
  2. Click Random HTML Generator.
  3. In the text box, type each text phrase on a new line. The web server randomly picks a line from this list to display on web pages that have random HTML enabled.
  4. Click Save.

Testing the random HTML generator

The random HTML generator is now configured. To test your new random HTML generator, follow these steps:

  1. Create a web page that has a .shtml file extension. The .shtml file extension instructs the web server to use Server Side Includes (SSI) for the file.
  2. Copy and paste the following SSI directive into the .shtml file where you want the random text to appear:
    <!--#include virtual="cgi-bin/randhtml.cgi"-->
  3. Upload the web page to your web site and load the page in a browser. A different line of text should appear every time you reload the page.