全部博文(930)
分类: LINUX
2010-07-07 17:43:30
|
这个是获得客户端ip的,通过getenv这个函数还可以获得以下一些东东
"REMOTE_ADDR",
"DOCUMENT_ROOT",
"GATEWAY_INTERFACE",
"SERVER_SOFTWARE",
"SERVER_NAME",
"SERVER_PROTOCOL",
"SERVER_PORT",
"SERVER_ADMIN",
"SERVER_SIGNATURE",
"REQUEST_METHOD",
"REQUEST_URI",
"PATH_INFO",
"PATH_TRANSLATED",
"SCRIPT_NAME",
"SCRIPT_FILENAME",
"QUERY_STRING",
"REMOTE_HOST",
"REMOTE_ADDR",
"REMOTE_USER",
"REMOTE_IDENT",
"CONTENT_TYPE",
"CONTENT_LENGTH",
"HTTP_ACCEPT",
"HTTP_ACCEPT_CHARSET",
"HTTP_ACCEPT_LANGUAGE",
"HTTP_ENCODING",
"HTTP_USER_AGENT",
"HTTP_CONNECTION",
"HTTP_HOST",
"HTTP_REFERER",
"AUTH_TYPE"