7.7. Information Received by the CGI Program

ACGI program receives three types of information from the server:

  • Client request information

  • Path information

  • Posted data

We look at each of these in turn.

7.7.1. Request Information

The webserver makes available to the CGI script information about the current request called session information. This information can be retrieved with several provided methods.

Client information consists of the following:

  • remote_host()— the name of the client machine

  • user_name()— the name of the user if authenticated

  • user_agent()— the browser that the user is surfing with

  • referer()— the referer (remember, this is misspelled)

  • path_info()— the path information

  • query_string()— the query string

The first four items are ...

Get Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.