ENCYCLOPEDIA 4U .com



Encyclopedia Home Page

Google
  Web Encyclopedia4u.com

 

Common Gateway Interface

Common Gateway Interface (CGI) is an important World Wide Web technology that enables a client web browser to request data from a program executed on the Web server. CGI specifies a standard for passing data between the client and the program.

Originally, CGI was invented by NCSA för the NCSA HTTPd web server in 1993. This web server used UNIX shell environment variables to store parameters passed from the web server execution environment before spawning the CGI program as a separate process.

The programming language Perl is well known as a language used for CGI, but one of the points of CGI is to be language-neutral. The Web server does not need to know anything about the language in question.

An example of a CGI program is the one implementing Wikipedia: you hand it the name of an entry, and it will retrieve the source of this entry's page (if one exists), transform it into HTML, and send the result back to the browser. Or tell it that you want to edit a page. All Wikipedia operations are managed by this one program.

The way CGI works from the Web server's point of view is that certain locations (e.g. http://www.wikipedia.com/wiki.cgi) are defined to be served by a CGI program. Whenever a request to a matching URL is received, the corresponding program is called, with any data that the client sent as input. Output from the program is collected by the Web server, augmented with appropriate headers, and sent back to the client.

Because this technology generally requires a fresh copy of the program to be executed for every CGI request, the work load quickly overwhelmed many servers and more efficient and flexible technologies such as PHP, as well as more efficient versions of CGI to be created for other languages, were developed by 2000.

External Links





Content on this web site is provided for informational purposes only. We accept no responsibility for any loss, injury or inconvenience sustained by any person resulting from information published on this site. We encourage you to verify any critical information with the relevant authorities.



Copyright © 2005 Par Web Solutions All Rights reserved.
| Privacy

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article "Common Gateway Interface".