Ford & Mason Ltd
HOME
ABOUT
CONTACT
RESOURCES
ADVERTISING



donations support the development of
cronolog.org
and
refcards.com

next up previous contents index
Next: Inputs to the Up: Dynamic Documents Previous: Dynamic Documents


The CGI specification

All the major Web servers support the facility to create dynamic HTML documents as the output of external programs. The Common Gateway Interface (CGI) specification defines how HTTP servers interact with external gateway programs. At the time of writing, the current version of this specification is 1.1.

These external programs, commonly called CGI scripts, can be written in virtually any programming language: Perl, the various shells, AWK and C are among the most commonly used. Using HTTPD for Windows you can also write CGI scripts in Visual Basic, which enables you to make use of Dynamically Linked Libraries (DLLs) to interface to standard Microsoft Windows applications, such as spreadsheets and databases.

Information is passed to CGI scripts by the Web server in environment variables and in the standard input stream. The CGI script should be written to output an HTML document, with MIME headers prepended. The server sends the output back to the browser and the headers inform the browser of the MIME type of the document, thus indicating how it should be displayed.

CGI scripts have the potential to open up security loopholes, primarily because of their capability to access information outside the Web directory hierarchy, but also due to their ability to interface to other potentially untrustworthy applications. A fuller discussion of the security issues can be found in Section gif.



next up previous contents index
Next: Inputs to the Up: Dynamic Documents Previous: Dynamic Documents

[ITCP]Spinning the Web by Andrew Ford
© 1995 International Thomson Publishing
© 2002 Andrew Ford and Ford & Mason Ltd
Note: this HTML document was generated in December 1994 directly from the LaTeX source files using LaTeX2HTML. It was formatted into our standard page layout using the Template Toolkit. The document is mainly of historical interest as obviously many of the sites mentioned have long since disappeared.

 
Copyright © 1996-2002 Ford & Mason Ltd