my net house

WAHEGURU….!

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.

Web pages cannot interact directly with the reader. In fact, until JavaScript came along, Web pages had no way of interpreting reader reaction except through interaction with the server they were running on. This interaction is done through scripts and programs that use common gateway interface to create interactive programs on your Web pages.

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?

Many of the uses of CGI can be duplicated by newer technology such as JavaScript and ActiveX. The primary benefit to using CGI rather than browser based scripting is that you can be sure that all of your readers (with very few exceptions) will be able to use the program. Java, JavaScript, and ActiveX can all be turned off within the browser, and many browsers simply don’t support them. Also, it is becoming more common for company firewalls to disallow these technologies to work in their system (often for security or bandwidth reasons). Because CGI scripts are run on the external Web server, they are not limited by browser or firewall limitations.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: