Here is a list of the server variables which may be used in the GET_SERVER shortcode.
The filename of the currently executing script, relative to the document root.
CGI version in use; i.e. ‘CGI/1.1’.
The IP address of the server.
The name of the server host.
Server identification string for response headers.
Name and version of the information protocol ; i.e. ‘HTTP/1.0’;
Method was used to access the page; i.e. ‘GET’, ‘POST’, etc.
The timestamp of the start of the request.
The timestamp of the start of the request, with microsecond precision.
The query string.
The document root directory inside which the current node is executing.
Contents of the Accept: header from the current request.
Contents of the Accept-Charset: header from the current request. Example: ‘iso-8859-1,*,utf-8’.
Contents of the Accept-Encoding: header from the current request. Example: ‘gzip’.
Contents of the Accept-Language: header from the current request. Example: ‘en’.
Contents of the Connection: header from the current request. Example: ‘Keep-Alive’.
Contents of the Host: header from the current request.
The address of the page (if any) which referred the user agent to the current page. . This may be easily spoofed with some browsers so it is not to be relied upon for security..
Contents of the User-Agent: header from the current request. May also be spoofed.
Set to a non-empty value if the script was queried through the HTTPS protocol.
Note: Note that when using ISAPI with IIS, the value will be off if the request was not made through the HTTPS protocol.
The IP address from which the user is viewing the current page.
The Host name from which the user is viewing the current page. The reverse dns lookup is based off the REMOTE_ADDR of the user.
Note: Your web server must be configured to create this variable. For example in Apache you’ll need HostnameLookups On inside httpd.conf for it to exist. See also gethostbyaddr().
The port being used on the user’s machine to communicate with the web server.
The authenticated user.
The authenticated user if the request is internally redirected.
The absolute path name of the currently executing script.
Filesystem- (not document root-) based path to the current script, after the server has done any virtual-to-real mapping.
Contains the current script’s path. This is useful for pages which need to point to themselves. The __FILE__ constant contains the full path and filename of the current (i.e. included) file.
The URI which was given in order to access this page; for instance, ‘/index.html’.
When doing Digest HTTP authentication this variable is set to the ‘Authorization’ header sent by the client (which you should then use to make the appropriate validation).
When doing HTTP authentication this variable is set to the username provided by the user.
When doing HTTP authentication this variable is set to the password provided by the user.
When doing HTTP authentication this variable is set to the authentication type.
Contains any client-provided pathname information trailing the actual script filename but preceding the query string, if available. For instance, if the current script was accessed via the URL http://www.example.com/php/path_info.php/some/stuff?foo=bar, then $_SERVER[‘PATH_INFO’] would contain /some/stuff.
Original version of ‘PATH_INFO’ before processed by PHP.
Note: add COOKIES