CGI(COMMON GATEWAY INTERFACE)
COMMON GATEWAY INTERFACE
When you are dealing with Web pages, you will often hear people talk about CGI or CGI scripts without ever explaining exactly what that is. Essentially, CGI is the connection (or interface) between a form on a Web page and the Web server.
Some Things to Remember About CGI
1.CGI is not the program itself
2.CGI is simply the interface between the Web page or browser and the Web server that runs the program.
3.You must have CGI access to run programs on your Web page
4.Many of the less expensive and free hosting providers do not allow CGI access on their servers. Contact your hosting provider for more information.
5.Any program or script that will run on your Web server, can be used as a CGI program
6.Most people use Perl to write their CGI scripts, but other languages include C and C++, Tcl, and UNIX shell scripts.
Uses of CGI Scripts
Some of the most interesting uses of CGI are to create Web documents that depend on user interaction. There are scripts to take readers to random pages on the site, create pages specific to them based on form input, and generate pages based on databases of information.
CGI scripts are used to resolve form data, put that data in to databases, send the data out as an email message, respond to the form entry with email or another Web page, and much more.
CGI scripts also are used for behind the scenes interaction with Web readers. They can set and read cookies, get and tabulate information such as browser and operating system, calculate hit counts, and monitor Web traffic.
Why Use CGI?