O'Reilly logo

Sams Teach Yourself CGI in 24 Hours, Second Edition by Rafe Colburn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How CGI Programs Work

Now I’m ready to get down to the nuts and bolts of how CGI programs work. The great thing about CGI is that it’s an extremely simple interface. If you’re familiar with UNIX-based operating systems, you will recognize the concepts that CGI is grounded in.

As I’ve already discussed, CGI is a set of conventions that allows Web servers and external programs to communicate. To illustrate how CGI programs work, I’m going to include a description of the entire HTTP session, so you can understand at a high level how it all fits together.

How Resources Are Requested

An HTTP session is initiated when a Web client (usually a Web browser) requests a resource from a Web server. As I’m sure you already know, these resources are identified ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required