Server Side Includes Examples

Quid Pro Quo includes a powerful feature known as Server Side Includes (SSI). This feature allows you to create dynamic web pages that can change based on a user's network address, the time of day, and other criteria. This page links to several examples of SSI usage. Note that to use these examples, you must be accessing the page through the Quid Pro Quo web server, and NOT opening the files directly from your hard drive.

The Quid Pro Quo manual includes a section on creating and administering your own SSI documents.

Environment Variables

Environment variables are values that can be inserted into your document. These variables include the number of hits a page has received, the date of the page's last modification, the user's IP address, and many others. Environment variables are the quickest and the easiest SSI feature to implement. The Environment Variables page shows how to use all of the variables that Quid Pro Quo supports.

Include Files

SSI allows you to include the contents of an entire file in the document being served. For instance, many web sites have a page footer that includes links to other pages and a "mailto" URL for the webmaster. Instead of typing this information into each HTML file on your site (and having to update each file when the information changes), you can simply put the information in a single file and include the file in all of your web pages. For an demonstration of this, see the Include Files page.

CGI Output

Using Quid Pro Quo SSI, you can include the output of a CGI or multiple CGIs in a single page. This opens up new possibilities for dynamic web pages. In the typical CGI model, a user requests a CGI action. The CGI returns the entire page, which is returned to the client with no further processing on the part of the server. In the SSI CGI model, the SSI page requests the CGI action, and inserts its output into the page as defined by you. This allows you to run a single CGI multiple times, or many different CGIs, and have the results returned in a single page. The URL Randomizer page demonstrates how to use multiple CGI requests in a single page.


Home | Manual | Examples | Third Parties