Tuesday, May 12, 2009

Common Gateway Interfacesssss 3

Dynamic Document

sssssAlthough there are three different types of web documents used

in the World Wide Web, static, dynamic and active, the only category

that best satisfies the specific content requirement of the Common

Gateway Interface (CGI) is the dynamic document.

  • Dynamic Document is when a request arrives the web server

    runs an application program that creates the document. Each

    request for the document can result in different responses.
Common Gateway Interface - Input

sssssThe input from a browser to a server is sent by using a form. If

the information in a form is small, it can be appended to the URL

after the question mark as shown in Figure 2. For example, this URL

is carrying form information: http://www.deanza/cgi-bin/prog.pl?23

(Forouzan, 2007).

sssssWhen the server receives the URL, it uses the part before the

question mark to access the program to be run, and it interprets the

part after the question mark (23) as the input sent by the client. It

then stores this string in a variable and when the CGI program is

executed it can access this value (Forouzan, 2007).

sssssIf the input from a browser is too long to fit in the query string,

the browser can ask the server to send a form. The browser can then

fill the form with the input data and send it to the server. The

formation in the form can be used as the input to the CGI program

(Forouzan, 2007).