public documentRoot ( ) : string | ||
return | string | The document root directory under which the current script is executing, as defined in the server's configuration file. |
public gatewayInterface ( ) : string | ||
return | string | What revision of the CGI specification the server is using; i.e. 'CGI/1.1'. |
public httpAccept ( ) : string | ||
return | string | Contents of the Accept: header from the current request, if there is one. |
public httpAcceptCharset ( ) : string | ||
return | string | Contents of the Accept-Charset: header from the current request, if there is one. Example: 'iso-8859-1,*,utf-8'. |
public httpAcceptEncoding ( ) : string | ||
return | string | Contents of the Accept-Encoding: header from the current request, if there is one. Example: 'gzip'. |
public httpAcceptLanguage ( ) : string | ||
return | string | Contents of the Accept-Language: header from the current request, if there is one. Example: 'en'. |
public httpClientIp ( ) : string | ||
return | string | Clients' ip address. This date cannot be trusted if you are behind a reverse proxy. In that case you should first check for Server::httpXForwardedFor. |
public httpConnection ( ) : string | ||
return | string | Contents of the Connection: header from the current request, if there is one. Example: 'Keep-Alive'. |
public httpReferer ( ) : string | ||
return | string | The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. |
public httpUserAgent ( ) : string | ||
return | string | Contents of the User-Agent: header from the current request, if there is one. This is a string denoting the user agent being which is accessing the page. A typical example is: Mozilla/4.5 [en] (X11; U; Linux 2.2.9 i586). Among other things, you can use this value with get_browser() to tailor your page's output to the capabilities of the user agent. |
public httpXForwardedFor ( ) : string | ||
return | string | Check for clients ip behind a reverse proxy. |
public origPathInfo ( ) : string | ||
return | string | Original version of 'PATH_INFO' before processed by PHP. |
public pathInfo ( ) : string | ||
return | string | 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. |
public pathTranslated ( ) : string | ||
return | string | Filesystem- (not document root-) based path to the current script, after the server has done any virtual-to-real mapping. |
public phpAuthDigest ( ) : string | ||
return | string | 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). |
public phpAuthUser ( ) : string | ||
return | string | When doing HTTP authentication this variable is set to the username provided by the user. |
public queryString ( ) : string | ||
return | string | The query string, if any, via which the page was accessed. |
public redirectRemoteUser ( ) : string | ||
return | string | The authenticated user if the request is internally redirected. |
public remoteAddress ( ) : string | ||
return | string | The IP address from which the user is viewing the current page. |
public remoteHost ( ) : string | ||
return | string | 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. |
public remotePort ( ) : string | ||
return | string | The port being used on the user's machine to communicate with the web server. |
public requestMethod ( ) : string | ||
return | string | Which request method was used to access the page; i.e. 'GET', 'HEAD', 'POST', 'PUT'. NOTE: PHP script is terminated after sending headers (it means after producing any output without output buffering) if the request method was HEAD. |
public requestTime ( boolean $float = false ) : string | ||
$float | boolean | Microsecond precision or not. |
return | string | The timestamp of the start of the request. |
public requestUri ( ) : string | ||
return | string | The URI which was given in order to access this page; for instance, '/index.html'. |
public scriptFilename ( ) : string | ||
return | string | The absolute pathname of the currently executing script. Note: If a script is executed with the CLI, as a relative path, such as file.php or ../file.php, $_SERVER['SCRIPT_FILENAME'] will contain the relative path specified by the user. |
public scriptName ( ) : string | ||
return | string | 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. |
public serverAdmin ( ) : string | ||
return | string | The value given to the SERVER_ADMIN (for Apache) directive in the web server configuration file. If the script is running on a virtual host, this will be the value defined for that virtual host. |
public serverIpAddress ( ) : string | ||
return | string | The IP address of the server under which the current script is executing. |
public serverName ( ) : string | ||
return | string | The name of the server host under which the current script is executing. If the script is running on a virtual host, this will be the value defined for that virtual host. |
public serverPort ( ) : string | ||
return | string | The port on the server machine being used by the web server for communication. For default setups, this will be '80'; using SSL, for instance, will change this to whatever your defined secure HTTP port is. Note: Under the Apache 2, you must set UseCanonicalName = On, as well as UseCanonicalPhysicalPort = On in order to get the physical (real) port, otherwise, this value can be spoofed and it may or may not return the physical port value. It is not safe to rely on this value in security-dependent contexts. |
public serverProtocol ( ) : string | ||
return | string | Name and revision of the information protocol via which the page was requested; i.e. 'HTTP/1.0'; |
public serverSignature ( ) : string | ||
return | string | String containing the server version and virtual host name which are added to server-generated pages, if enabled. |
public serverSoftware ( ) : string | ||
return | string | Server identification string, given in the headers when responding to requests. |