What is CGI? Well, CGI stands for Common Gateway Interface. Beyond that, explaining
CGI gets somewhat difficult. Basically, CGI is a standard of communication, a
specification of how programs can talk to web servers and web servers can talk to
programs; it is almost like a new language. Sounds complicated? I can be, but don't worry
we can try and clear it up a little. To put it more simply, CGI lets a web server take
information from something like a form (let's say, your first name...) and pass it along to
an external program, called a script (maybe a script that makes a limerick out of first
names...). The script then takes the information (your first name...) and does what it was
built to do (make limericks...). The script then takes the results (the limerick...) and passes
back to the web server using CGI. Finally the web server sends it on to you to enjoy. By
providing a "gateway" between the web server and scripts, a page with the right
commands can be made do just about anything, and some do. CGI can keep track of your
visitors, handle imagemaps, and even build and manage search engines; the possibilities are
endless.
Because CGI is fairly complicated and sometimes requires some programming knowledge,
it can and often does fill a 600 page book. It is because of this that we won't go into great
detail, but will try and show you things you can do with CGI that does not require and
programming, like Server-Side Includes. We will also show you some of the variables that
CGI uses to make servers and scripts communicate.