Switch to autotools: CHANGES renamed into ChangeLog
[infodrom/cgilib] / cgi.5
1 .\" cgi - Common Gateway Interface
2 .\" Copyright (c) 1998,9,2007,8 by Martin Schulze <joey@infodrom.org>
3 .\" 
4 .\" This program is free software; you can redistribute it and/or modify
5 .\" it under the terms of the GNU General Public License as published by
6 .\" the Free Software Foundation; either version 2 of the License, or
7 .\" (at your option) any later version.
8 .\" 
9 .\" This program is distributed in the hope that it will be useful,
10 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
11 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 .\" GNU General Public License for more details.
13 .\" 
14 .\" You should have received a copy of the GNU General Public License
15 .\" along with this program; if not, write to the Free Software Foundation
16 .\" Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 .\"
18 .TH cgi 5 "6 April 2008" "CGI Library" "Programmer's Manual"
19 .SH NAME
20 cgi \- Common Gateway Interface
21
22 .SH DESCRIPTION
23 The Common Gateway Interface is a way to create dynamic web pages.
24 It defines rules for interaction between a program and the web server
25 while the server talks to the client.  There are some ways to use it.
26
27 .SH "ENVIRONMENT"
28 Normally the webserver sets several environment variables to give some
29 information to the CGI program so it can determine various stuff.
30 .TP
31 .B AUTH_TYPE
32 This reflects the authentification method used to validate a user.
33 .TP
34 .B CONTENT_LENGTH
35 The length of the data in bytes passed to the CGI program through
36 standard input.  This is used by the POST method.
37 .TP
38 .B CONTENT_TYPE
39 The MIME type of the query data, such as "text/html", optional.
40 .TP
41 .B DOCUMENT_ROOT
42 This reflects the document root directory of the webserver.
43 .TP
44 .B GATEWAY_INTERFACE
45 Reflects the version of the Common Gateway Interface that the server
46 is using
47 .TP
48 .B HTTP_ACCEPT
49 A comma separated list of MIME type that the client is willing to
50 accept.
51 .TP
52 .B HTTP_FROM
53 The email address of the user issuing the information request.  This
54 is not supported by most browsers.
55 .TP
56 .B HTTP_REFERER
57 Reflects the URL from which this CGI program was accessed.
58 .TP
59 .B HTTP_USER_AGENT
60 The name, version and libraries of the browser making the request.
61 This information can be used to determine if the browser is capable of
62 graphics and is able to display frames and tables.
63 .TP
64 .B PATH_INFO
65 This shows extra information that was passed to the CGI program via
66 command line.  Normally it's empty or non-existent.
67 .TP
68 .B PATH_TRANSLATED
69 The translated path on the local filesystem.
70 .TP
71 .B QUERY_STRING
72 This variable refers to additional arguments that were appended to the
73 CGI program - normally with the '?' sign.
74 .TP
75 .B REMOTE_ADDR
76 This refers to the host from which the information request was issued,
77 as IP number.
78 .TP
79 .B REMOTE_HOST
80 This refers to the host from which the information request was issued.
81 .TP
82 .B REMOTE_USER
83 The authenticated name of the user.
84 .TP
85 .B REQUEST_METHOD
86 This refers to the method with which the information request was
87 issued.  Normally this is either GET or POST.
88 .TP
89 .B SCRIPT_NAME
90 The virtual name of the script being executed.
91 .TP
92 .B SERVER_NAME
93 The server's hostname or IP number.  This may be used to determine the
94 correct paths or resulting HTML code for CGI programs that are used on
95 the same machine for several servers.
96 .TP
97 .B SERVER_PROTOCOL
98 This is the name and version of the information protocol the request
99 came in with.  Normally this is "HTTP/1.0" or "HTTP/1.1".
100 .TP
101 .B SERVER_PORT
102 This refers to the TCP/IP port on which the webserver is running.
103 .TP
104 .B SERVER_SOFTWARE
105 This reflects the name and revision of the webserver software.
106
107 .SH "AUTHOR"
108 This CGI library is written by Martin Schulze
109 <joey@infodrom.org>.  If you have additions or improvements
110 please get in touch with him.
111
112 .SH "SEE ALSO"
113 .BR cgiDebug (3),
114 .BR cgiHeader (3),
115 .BR cgiSetType (3),
116 .BR cgiSetHeader (3),
117 .BR cgiGetValue (3),
118 .BR cgiGetVariables (3).