[CSM CGI Main Menu] [Application: http://www.students.mines.edu/setup/] [Examples: http://www.students.mines.edu/examples/] [Guidelines: http://www.students.mines.edu/setup/guidelines.shtml] [CSM Home: http://www.mines.edu/] [CGI Home: http://www.students.mines.edu/]
[CGI & SSI Examples]

CGI and SSI Examples

CGI's (Common Gateway Interface) and SSI's (Server Side Includes) in some ways are very similar, but they serve different purposes. Both CGI's and SSI's can be programs (SSI's don't have to be), but CGI's are generally used to create another document, or act in some fashion based on input to the current page. SSI's on the other hand, are used to modify the content of the page currently being viewed, or perform some action before the current page is displayed.

CGI's and SSI's programs can to written using Perl, C, C++, and in theory almost any compiled or scripted programming language. The examples here will focus only on Perl and C programs. SSI's may also include simple in-line commands.

A problem with CGI and SSI programs is that they run on the server computer, thus using the server computers CPU and memory resources. It not carefully written, they can also compromise the computer system security (see Guidelines for Good CGI and SSI Programming). Because of this, these programs, must be carefully written, they should be short, and they should minimize their impact on system resources. If possible, more demanding programs should be written in Java, which run on the clients computer. A Java program, once uploaded to the client no longer affects the servers system performance.

CGI Examples

SSI Examples


Comments to webmaster@mines.edu
<i>March 1998</i>