What is CGI?

While dealing with WebPages you may have noticed the term CGI. Have you ever think about it? What is it or how it is helpful to us?? Web India Solutions can help you to know about it…

What is CGI?
It means Common Gateway Interface. It involves a set of rules for running scripts and programs. It specifies what information is communicated between the Web server and clients’ Web browser and how the information is transmitted. The program run by CGI can be any type of executable file on the server platform. For example, you can use C, C++, Perl, UNIX shell scripts, FORTRAN, or any other compiled or interpreted language. You can also use Tcl scripts with CGI.

How it works?
Most of the web pages you see on the Internet are static, means, once you create and publish an HTML page, its content doesn’t change until the next time you edit it.
Using CGI scripts is one of the ways to add dynamic content or interactive functions to your static web pages. There is a sequence of events for creating a dynamic HTML document through CGI scripting. At first the client makes an HTTP request by means of a URL. This URL is then typed into the ‘Location’ window of a browser. From the URL, the Web server determines that it should activate the gateway program listed in the URL and send any parameters passed via the URL to that program. The gateway program processes the information and returns HTML text to the Web server. The server, in turn, adds a MIME header and returns the HTML text to the Web browser. The Web browser displays the document received from the Web server.The primary benefit of using CGI rather than browser based scripting is that all of your readers will be able to use the program. Also, since CGI programs run on the web server itself, you don’t have to worry about the type of browser or the type of computer your visitors are using.
0

Leave a Reply

Your email address will not be published. Required fields are marked *
You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>