Open Source Web Development with LAMP: Using Linux, Apache, MySQL, Perl, and PHP
by James Lee, Brent Ware
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access