CGI Tutorials

The Common Gateway Interface ( CGI ) is a standard protocol for interfacing external application software with an information server, commonly a web server. This allows the server to pass requests from a client web browser to the external application. The web server can then return the output from the application to the web browser.

CGI arose out of discussions on the www - talk mailing list between Rob McCool, John Franks, Ari Luotonen, George Phillips and Tony Sanders in 1993. Rob McCool, working at NCSA, drafted the initial specification and provided a reference implementation in the NCSA HTTPd web server using environment variables to store parameters passed from the web server execution environment before spawning the CGI program as a separate process.


CGI Tutorials Links

How CGI Scripting Works
URL: http://computer.howstuffworks.com/cgi.htm
A basic introduction to CGI.

CGI Tutorial
URL: http://www.comp.leeds.ac.uk/nik/Cgi/start.html
A short tutorial from the University of Leeds that explains CGI scripts, demonstrates a simple Perl script, CGI environment variables and forms. Appears to be all Perl and includes a few exercises.

The CGI Bin
URL: http://www.thecgibin.com/
5 tutorials on CGI form handling, hit counting, cookies and Server Side Includes.

CGI Programming 101
URL: http://www.cgi101.com/book/
The first six chapters from a book on CGI programming are available for free online or in .pdf format. Sample chapters cover getting started (writing scripts, uploading, etc.), Perl Variables, CGI Environment Variables, Processing Forms, Advanced Forms, and Reading & Writing Data Files. Source code from remaining chapters is also available.

A guide to HTML and CGI scripts
URL: http://snowwhite.it.brighton.ac.uk/~mas/mas/courses/html/html.html
This site has some basic HTML stuff and examples of forms as well as an example of calling a CGI script file, decoding data sent to a CGI script and a script to record users to a web page. All the scripts appear to be in C++.

The Most Simple Intro to CGI
URL: http://bignosebird.com/lscgi.shtml
This site has an explanation of how CGI works illustrated with some cute graphics and has an example first script in Perl that processes form data and writes the form input back to the browser.

CGI for the Total Non-Programmer
URL: http://www.webteacher.com/cgi/
Short tutorial on the basics of creating CGIs with Perl on a Unix platform and includes a template for running scripts on a pc or mac. Covers the basics of Perl, hit counting, and guestbooks. The main page says processing passwords is covered, but I didn't see it when I was there.

CGI Made Really Easy
URL: http://www.jmarshall.com/easy/cgi/
The title is a little optimistic, but this site includes a brief introduction has some sample scripts for "Hello World" and echoing form input in both Perl and C. Also a mailer script in Perl and some security inforomation and useful CGI environmental variables on the footnotes page that you can find from the links at the bottom of the main page.

The Common Gateway Interface
URL: http://hoohoo.ncsa.uiuc.edu/cgi/
This site from NCSA has CGI documentation, examles of form handling in both C and Perl and an ftp archive of CGI programs.

CGI Script Installation Tutorial
URL: http://www.stylusinc.com/cgi_installation/help.htm
An article on CGI installation that is a short tutorial for getting your scripts up and running on the server.

The CGI Directory:
URL: http://www.cgidir.com/index.html
This is an extensive CGI directory with over a thousand scripts and a tutorials sections for beginner and advanced as well as links to SSI (Server Side Includes) tutorials. The focus appears to be on Perl, naturally enough, but I only had time to sample a few of the many scripts.

CGI City
URL: http://www.icthus.net/CGI-City/tutorials.shtml
This site features an online Perl reference, web development articles, apache & MySQL installation instructions and a series of "How Do I" articles that are short how-to pages with example code in Perl "written with the beginner in mind."

CGI Programming FAQ
URL: http://www.webthing.com/tutorials/cgifaq.html
Frequently asked CGI questions.

CGI Programming on the World Wide Web
URL: http://www.oreilly.com/openbook/cgi/
This book is out of print, but it has been made available online through the O'Reilly Open Books Project.

CGI Programming FAQ
URL: http://www.htmlhelp.com/faq/cgifaq.html
CGI Programming FAQ (mirror of above)

Tek-Tips CGI Forum
URL: http://www.tek-tips.com/gthreadminder.cfm/lev2/4/lev3/31/pid/452
CGI forum.

Share this

Related Posts

There was an error in this gadget