O'Reilly logo

Sams Teach Yourself CGI in 24 Hours, Second Edition by Rafe Colburn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CGI Environment Variables

CGI programs receive information in a variety of forms. One of the most useful of these forms is the set of CGI environment variables. Based on the contents of these variables, a CGI program can make meaningful decisions regarding how best to interact with the Web client that invoked the CGI program.

CGI environment variables are provided to the CGI program by the parent Web server process. The server creates these variables using information derived from three different sources:

  • The incoming HTTP request. This provides REMOTE_ADDR information.

  • The Web server program itself. For instance, the SERVER_SOFTWARE variable is provided by the Web server.

  • The HTTP request header provided to the Web server by the Web client. For ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required