Writing CGI handlers with the Icon language |
|
If you would like to use a CGI (Common Gateway Interface) link to construct a Web page on demand, you can do all the programming in Icon.
Here's a link to a CGI handler named icon.cgi. When you click on it, you will go to a page that shows the values of all the important environmental variables of the CGI interface. It also has a text field into which you can type any string and then see what that string looks like to the CGI handler.
The icon.cgi handler is constructed by compiling the Icon program named iconcgi.icn. This program uses some procedures from source file cgiutil.icn.
To see how these procedures are used to handle a forms query, see the forms test page. The source for this handler is a program named script7.icn.
For some general background on CGI programming, see the official CGI interface document, or see the PostScript document The HTML Common Gateway Interface (CGI).