Some common applications for such programs are querying databases, creating graphics on the fly, and handling form input. In order to write and use CGI programs, you should understand the underlying mechanisms of the Web. The World Wide Web is based on a client-server architecture. What most Web users see is the client program, commonly known as a Web browser, of which Netscape and Mosaic are examples. The other side is the Web server, which runs on systems at the Web host site.
Any computer connected to the Internet can be a Web server.
The server responds back over the net with a status line followed by a set of MIME headers, and, usually, a data object which is the body of what has been requested. Most HTTP requests are the result of following a URL and are attempts to retrieve files or documents on that server. When your Web server fields an HTTP request which resolves to an executable program on the server, the Web server will execute that program and set up a number of inputs for the program that tell it how it was invoked from the Web. When the program runs it may do anything it has permission to do on that system and runs as an anonymous job. Implementation Languages You can write CGI programs in just about any programming language that can execute on your server's hardware.