Online Programz

Daily Archives : September 1st, 2009

Common Gateway Interface And Its Working

CGI stands for common gateway interface. CGI is a set of standards by which web servers can communicate with external program to handle the data from the form. This is due to reason that web server is not programmed to process the form data.

CGI doesn’t communicate directly with browser. The browser talks with server, server in turn talk with CGI program and CGI returns the answer to server and server talks to the browser.

Working Of CGI :

A CGI is only a program which are generally called scripts because they were written in UNIX and shell script and PERL. PERL is a interpreted and immediately compiled into machine instructions.C language is also used, but it is not called as script normally.After looking at CGI program, server access information from browser.Before launching the scripts, it prepares a number of variables called environment variables representing the current state of server. If server is busy with various scripts, CGI excutes its scripts at once each with its own environment.