Slide 3.7: Writing HTML scripts Slide 3.9: Writing CGI scripts Home |
CGI is a standard for running external programs from a World-Wide Web HTTP server.This CGI program can do any number of things from getting the current date and time to performing a complex lookup and update in a database. In either case, the results are not the same everytime the link or button is pressed. Commonly, the program will generate some HTML pages which will be passed back to the browser. CGI allows the returned HTML page to depend in any arbitrary way on the request. The process occurs something like this:
http://www.cgitest.com/cgi-bin/test.cgi
).
test.cgi
.
test.cgi
program does what it is programmed to do.
test.cgi
program also builds an HTML file in memory and sends it back to the user's browser.