[Top]
[Next]
[Prev]
|
.................... Introduction to CGI
|
An Introduction to
The Common Gateway Interface
Contents
1. Data Communication on the Web
2. Figure: Flow of Data on the Web
3. The Common Gateway Interface
4. References to Additional Information
And also: CGI Programming Tricks (mostly Perl)
1. Data Communication on the Web
A Web client program (such as a web browser) can access data from
many different servers, such as Gopher, FTP, NNTP (Usenet) or HTTP.
The HTTP server was designed specifically for the Web, and employs a
protocol (system of messages) that supports sending documents from the
server to a browser, and that also support
sending complex data from the client back to the server.
There are several HTTP methods for doing this (in HTTP,
methods is a technical term for the way in which data are
sent between a client browser and server). The most common methods are
- GET -- the data are passed within the query string
of the URL. For example, accessing the URL
http://bla.bla.edu/stuff/program?query_string
sends the data included in query_string to the
HTTP server running on the machine bla.bla.edu.
- POST -- the data are sent as a message body that
follows the request message sent by the client to the server.
This is more complex than GET, but allows for more complex data.
These methods are discussed in more detail in the
HTTP documentation section.
For this discussion, it is sufficient to know that data can be sent
from the client browser to the HTTP server. The Common Gateway Interface,
or CGI, is the mechanism used by most servers to process these client
data.
[Top]
[Next]
[Prev]
|
.................... Introduction to CGI
|