Skip to main content.

Web Based Programming Tutorials

Homepage | Forum - Join the forum to discuss anything related to programming! | Programming Resources

CGI Programming Unleashed

appendix A -- Web Resources

appendix A

Web Resources


As mentioned in previous chapters, one of the greatest things about programming with CGI is the vast number of resources available to help you. Everything from tutorials to prewritten programs is available on the Web. I have spent many hours compiling a list of as many of these CGI resources as I could find, and it is included here for you.

I have purposely tried to leave out any site that just sells CGI products or does Web consulting, because it would not be fair to have some but not all of the companies that do so. I have included companies that produce freeware or shareware products related to CGI.

O'Reilly and Associates CGI Information Page

O'Reilly is the distributor of WebSite server software, and because of this, this page contains a lot of WinCGI-related code snippets, samples, and so on.

Dale Bewley's PD Perl Site

Contains public domain Perl scripts that do a variety of tasks.

EIT Software Archive

Home of hypermail, libcgi, and so on. Although the software is still there, most of it is no longer supported by EIT.

The CGI Collection

This is a collection of CGI information, links to other CGI sites, and CGI scripts written in various languages. The scripts here cover a lot of the things that CGI is generally used for (mail form handling, clocks, counters, and so on).

Intro to CGI Programming at the University of Utah

This site contains a tutorial that introduces people to the basics of CGI programming. It goes over topics such as form handling, security, debugging, and so on. Sample programs are also included. Languages used are the Bourne shell and Perl.

Sundqvist's Web Developers Bookmarks

A list of links to other pages of CGI links, various overviews of CGI, various documentation on CGI, and various pages containing programs written in CGI.

Mooncrow's CGI/Perl Source Page

A page containing links to docs on general CGI programming and links to specific programs/info on Perl CGI programming.

Jobs for CGI Programmers

A place where people who need CGI/Web programmers can post their needs, so that the people who need jobs can contact them.

Lincoln D. Stein's CGI Examples

This page contains sample scripts from a book on how to set up and run a Web site.

A CGI Programmer's Reference

These pages are intended to collect information useful to Common Gateway Interface (CGI) programmers.

ACGI C++ Class Hierarchy

This is a link to a C++ class hierarchy that provides a very complete way to write CGI apps in C++. It is the most full featured C++ class hierarchy I know of.

C++ CGI Class

A class to aid development of CGI scripts written in C++. The class includes methods for HTML formatting as well as handling forms.

CGI Form Handling in Perl

Perl is an excellent language for a variety of tasks, especially those that require text management and data parsing. As a result, it is well suited for writing code to manage the common gateway interface (CGI) forms that have become the mainstay of World Wide Web interactive communication via HTML.

CGI Test Cases

This document references a test server that has implemented the CGI interface. It is provided to give a better understanding of how CGI works in reality. If you are interested, you should look at the source for the CGI script used in these examples.

CGI Specification

The Common Gateway Interface, or CGI, is an interface for running external programs, or gateways, under an information server. Currently, the supported information servers are HTTP servers. Perl5 CGI Library

This Perl 5 library uses objects to create Web fill-out forms on-the-fly and parse their contents. It is similar to in some respects. It provides a simple interface for parsing and interpreting query strings passed to CGI scripts.

CGI/1.1 Script Support of the CERN Server

Server scripts are used to handle searches, clickable images, and forms, and to produce synthesized documents on-the-fly. See calendar and finger gateway for examples.

CGIHTML-C Library for CGI

Describes a set of C routines for easily writing CGI programs. Includes documentation, a brief tutorial, and sample programs.


This is a CGI library. The code compiles in Windows NT and Posix systems.

CGIwrap-More Secure User Access to CGI Scripts

CGIwrap allows system administrators to let users create their own CGI scripts. CGIwrap performs various security checks on the scripts before changing the ID to match the owner of the script.

Custom Innovative Solutions

A source code library and several papers describing how to implement some applications.

EIT's CGI Library

These functions help you write virtual document (CGI) programs using C. Look at the template.c file for an illustrative example. Feel free to download the latest distributions from

Group Cortex CGI Center

This site contains references to information about the Common Gateway Interface (CGI) specification.

Introduction to the Common Gateway Interface

This site is the home of CGI. This is a link to the page that introduces CGI and some of its various concepts to the user.

John Donohue's Perl CGI Examples

Some examples of CGI programming written in Perl, such as an image map without using imagemap.c, juggling variables (maintaining state information) between pages, generating a random number, searching for names in a phone book, and a simple self-scoring questionnaire.

Matt's Script Archive

This site consists of many free CGI scripts for the taking. They can help you learn how to build your own CGI programs, or you can use them as is and install them on your system. Examples of the scripts include a guestbook, a free-for-all link page, a bulletin board message system, a form to e-mail gateway, a random image displayer, a random link generator, a countdown, and many more.

NR Gateways

This gives pointers to gateways and Plexus utilities developed at Norsk Regnesentral.

Selena Sol's Public Domain CGI Script Library

Public domain CGI scripts written by Selena Sol (shopping carts, feedback forms, groupware calendar, counters, clocks, animation, bulletin boards, and miscellaneous applications).

Setting up CGI in ncSA httpd

This is the original tutorial on how to create CGI applications. Although it is old, it covers a lot of CGI concepts.

The Common Gateway Interface

This document is intended to ease you into the idea of writing your own CGI programs with simplified examples and an explanation that is less technically oriented than the interface specification itself.

The Common Gateway Interface Specification

This is the original CGI 1.0 specification.

UnCGI Version 1.3

This is uncgi, a front end for processing queries and forms from the Web on UNIX systems. You can get it via anonymous FTP from or depending on your browser, by following this link. Without this program, if you wanted to process a form, you'd have to either write or dig up routines to translate the values of the form's fields from URL encoding to whatever your program required.

Web Construction

Mini-library of tools and information for constructing Web pages. It was produced as the site administrator put together the Australian Society of Indexers Web site.

A Simple CGI E-Mail Handler

A program to handle forms that need to e-mail people. Very simple and configurable.

ABC Tutorial on CGI

This is a link to a page containing CGI examples, code, and tutorials. These examples use WinCGI. Particularly known for its guestbook.

Ada 95 Binding to CGI

Interface to CGI interface for Ada 95 programs.

Amiga CGI Documentation

Contains documentation about and links to resources related to CGI programming on the Amiga.

AppleScript/Frontier CGI Tour

Tour through some Frontier and AppleScript CGIs dealing with simple image maps, redirection, client-pull, server-push, dynamic page generation, and form processing.

Building HTML-Based Interfaces

This document describes how to build graphical, form-based interfaces for end-user programs using HTML. The tutorial includes examples in C, C++, Perl, and Pascal.

C++ Class Library (Version 2.1)

This is a new version that incorporates some changes suggested by the people who gave feedback. It contains everything needed to process HTML forms.


Simulate URNs with a HTTP/1.0 redirect.

A library for creating Common Gateway Interface (CGI) scripts in the Perl language.

cgiutils Manual Page

The cgiutils program is provided to make it easier to easily produce a full HTTP1 response header by NPH [No-Parse-Headers] scripts.

Cookbook of Canned CGIs

Generic CGI programs written in Perl that you can use on your own site: mailto, imagemaps, server-push animations, and redirections.


A CGI script to be used on MacHTTP servers for the purposes of sending e-mail from WWW browsers that are not mailto-capable.

Felipe's AppleScript CGIs Examples

A collection of AppleScript CGIs, tutorials on writing CGI in AppleScript, and links to other pages containing info on CGI programming in AppleScript, and CGI on the Apple in general.

Forms in Perl

Some Perl scripts relevant to the handling of CGI forms.


Getcomments is a Perl CGI script that can take forms and do one of three things with it: It can e-mail the contents to someone, append the contents to a log, or display the variables back to the user.

Hack Chat

Easy to install, Hack Chat supports auto-refresh and multiple rooms and uses the latest features of Netscape 2.0 (frames and JavaScript).

HyperCard Server

An experimental server at New York University running MacHTTP and using HyperCard to generate interesting CGI scripts.

Language Interactive

An introduction for language and humanities teachers to the ins and outs of creating dynamic Web pages, especially Web forms and CGI scripting.

List of CGIs (Dave Ellis)

For all levels of programmers, this page provides links to online lessons, other pages of CGIs, and FTP sites, as well as programs and information about them.


Freeware Windows program designed to create, edit, and maintain World Wide Web clickable image maps.

Matt's Editor CGI

Free Perl scripts to let users edit Web pages from within their browsers rather than from UNIX accounts.

Netscape HTTP Cookie Notes

Helpful tips and code on setting HTTP magic cookies with code in MacPerl and AppleScript. Special notes about Microsoft Internet Explorer.

Processing of CGI Arguments Under Tcl

Contains information on how to handle GET requests using Tcl.

RedMan-Redirection Manager

A redirection manager for ncSA-style servers. Allows sysadmins to declare system-wide redirection and users to declare redirections without sysadmin intervention.

ROFM-a FileMaker Pro CGI

Serve FileMaker Pro databases on the World Wide Web from your Macintosh.

Serge's Sources

Sources of sample CGI programs in C++.

Sethro's Simple Scripts

Easy step-by-step scripts designed for non-programmers. Scripts include form return, a guestbook, and a post-it.

Shareware CGI

Contains several CGIs including a guestbook, an add-your-own-link page, and a post form to file CGI.

Tcl-Based CGI Forms

This page contains a Tcl-based CGI that allows for forms to be processed to e-mail.

Virtual Webwerx Division Zero-CGI Land

Includes Stat Trax, a free and easy way to keep statistics of all your Web pages.

Web Developers Warehouse

Build CGI apps for a Web site using C++.

Windows CGI 1.1 Description

This is a link to the Windows CGI 1.1 specification.

Other Online Resources

The only other non-HTTP based online resource I have found to be useful and available to people with accounts on either AOL, CompuServe, or MSN is the Usenet group comp.infosystems.www.authoring.cgi. A mailing list for CGI programming does exist, but traffic on it was nonexistent for the six months I was a member.

There is currently no existing centralized FTP site for CGI resources.

The resources available on AOL, CompuServe, and MSN are easily found and centralized, so there is no reason to list them here.