Server-side scripting



CGI programs can be shell scripts, Perl scripts, C binaries, etc.

When the user calls a CGI script (eg., the script (myscript.cgi) retrieves the list of arguments. The way it does this depends on whether the browser used the GET or POST method. When using GET, arguments are stored in the QUERY_STRING environment variable; When using POST, arguments are retrieved by running from the standard input. Any output generated by the script is routed through the standard output to the web server, which sends it to the browser.