PHP is a weak type of programming language, but the most web-in-program language has a system global function: $_server<?phpecho "". $_server[' php_self '); #当前正在执行脚本的文件名, and document Root-related echo "". $_server[' argv '; #传递给该脚本的参数. echo "". $_server[' argc '; #包含传递给程序的命令行参数的个数 (if run in command-line mode). echo "". $_server[' Gateway_interface '; #服务器使用的 the version of the CGI specification. For example, "cgi/1.1". echo "". $_server[' server_name '; #当前运行脚本所在服务器主机的名称. echo "". $_server[' Server_software '; #服务器标识的字串, given in the header in response to the request. echo "". $_server[' Server_protocol '; #请求页面时通信协议的名称和版本. For example, "http/1.0". echo "". $_server[' Request_method '; #访问页面时的请求方法. For example:, POST, PUT. echo "". $_server[' query_string '; A string #查询 (query). echo "". $_server[' Document_root '; #当前运行脚本所在的文档根目录. Defined in the server configuration file. echo "". $_server[' http_accept '; #当前请求的 Accept: The contents of the head. echo "". $_server[' Http_accept_charset '; #当前请求的 Accept-charset: The contents of the head. For example: "Iso-8859-1,*,utf-8". echo "". $_server[' http_accept_encoding '; #当前请求的 accept-encoding: The contents of the head. For example: "gzip". echo "". $_server[' Http_accept_language ']; #当前请求的 accept-language: The contents of the head. For example: "en". echo "". $_server[' http_connection '; #当前请求的 COnnection: The contents of the head. For example: "Keep-alive". echo "". $_server[' Http_host '; #当前请求的 Host: The contents of the header. echo "". $_server[' Http_referer '; #链接到当前页面的前一页面的 the URL address. echo "". $_server[' http_user_agent '; #当前请求的 User_agent: The contents of the head. echo "". $_server[' https '];#-if accessed via HTTPS, is set to a non-null value (on), otherwise returns Offecho "". $_server[' REMOTE_ADDR ']; #正在浏览当前页面用户的 IP address. echo "". $_server[' Remote_host '; #正在浏览当前页面用户的主机名. echo "". $_server[' Remote_port '; #用户连接到服务器时所使用的端口. echo "". $_server[' Script_filename '; #当前执行脚本的绝对路径名. echo "". $_server[' server_admin '; #管理员信息echo "". $_server[' Server_port '; #服务器所使用的端口echo "". $_server[' server_signature '; #包含服务器版本和虚拟主机名的字符串. echo "". $_server[' path_translated '; The base path of the #当前脚本所在文件系统 (not the document root). echo "". $_server[' Script_name '; #包含当前脚本的路径. This is useful when the page needs to point to itself. echo "". $_server[' Request_uri '; #访问此页面所需的 URI. For example, "/index.html". echo "". $_server[' Php_auth_user '; #当 PHP runs in the Apache module mode and is using the HTTP authentication feature, which is the user name entered by the user. echo "". $_server[' PHP_AUTH_PW '; #当 PHP runs in the Apache module mode and is using the HTTP authentication feature, which is the password that the user entered. echo "". $_server[' Auth_tyPE ']; #当 PHP runs in the Apache module mode and is using the HTTP authentication feature, this variable is the type of authentication.?>
PHP can get the client which access information