Airplane Balloon at Night - Photo courtesy of the CTDP, Free for use

CGI Scripting

Airplane Balloon at Dusk - Photo courtesy of the CTDP, Free for use

CGI Scripting Resources


  1. SSI Tutorial
  2. Perl Script Tutorial
  3. JavaScript Manual
  4. CGI Tutorial

CGI Scripting Web Links

CGI Scripting Section Introduction

This section includes basic technologies that are used on both sides of the client/server CGI interface. Therefore it includes:

  • Client side JavaScript
  • Server side Perl Script
  • CGI - Basic information about the CGI interface itself
  • SSI - Information about server side includes which enhances ability to use server side script programs.
This section will not include other technologies that may also perform the same function such as PHP which have their own sections. This section is intended only as an introduction to CGI and the various tools involved.

CGI Definition

CGI stands for common gateway interface. CGI is required in order for information passed from the client to the server using HTTP to be processed by a program which is running on the server. CGI is a defined standard that provides for the passing of data between a web server and a CGI application. The CGI defines a set of environment variables that are used to pass the data. A CGI application may be written in C, C++, Perl, Unix shells, TCL, JAVA, visual basic or other languages. The CGI variables may be set on the client side using client side embedded script code such as JAVA script or VB script.

The Defined method for getting data from an HTML page which may include a script form, is to use the GET or POST method.

Scope of this Section

Because there are many ways and tools that may be used to communicate between the client and the server, this section includes information about the following technologies:

  • The CGI Interface and CGI environment variables.
  • Perl server side script writing.
  • JavaScript client side script writing.
  • Server Side Includes (SSI) can enhance your page and make calling server side script programs easier, but it is not without penalties.

The reader should read the CGI section first to understand how data is passed from client to server and how to get the information. Then client or server script writing may be studied. I believe it is best to learn client script writing first, but it is a matter of preference. This section assumes the reader has familiarity with HTML and how to set up forms using the FORM tag in HTML. If not, the reader should refer to the HTML section. The information passed between the client and server is passed using the HTTP protocol, and the reader is referred to that section for information about that protocol.

Current Documentation in this Section

  • CGI Manual - Describes the CGI interface and how to use it. Describes data access methods such as GET and POST. Also describes the required headers for document description between the client and server. An example of a form posting is shown so the reader can see the format of the data transfer. A list of CGI variables is shown with examples for many and general CGI operation is documented. CGI environment variables are listed and described.
  • JavaScript Manual - This manual includes descriptions of variables, operators, program flow control, and available javascript objects. It describes the javascript object heirarchy.
  • Perl Script Manual - This is a brief Perl script manual with some examples to enable the reader to understand the server side script process.
  • SSI Manual - This manual lists and describes SSI variables and commands. Examples are given for each command.