• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 28. Programming CGI Scripts > CGI and the World Wide Web

CGI and the World Wide Web

By providing a standard interface, the Common Gateway Interface (CGI) specification enables developers to use a variety of programming tools. CGI programs are the magic behind processing forms, looking up records in a database, sending email, building on-the-fly pages, and dozens of other tasks. Without CGI and its other server-side cousins, such as Active Server Pages or Java servlets, your Web site can have no memory that spans multiple users and multiple hits and can't function dynamically without serious programming. With server-side processing, all the functionality that depends on having such persistent data becomes possible.

CGI is a set of rules that governs how an HTTP server and another program running on a Web server communicate. Strictly speaking, CGI defines a way for the Web server and the CGI program to "talk." The CGI program can be in any of quite a few programming languages—this enables programmers to use whatever languages they prefer when writing their code. What makes it a CGI program is the way it receives information from the Web server and sends information back. The CGI program does not communicate with the browser directly. The browser talks with the server, the server talks with the CGI program, and the server talks back to the browser.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint