我想读取本台机器的真实ip,不是内网地ip,象192.168.x.xxx 这样,而是要读取代理服务器的ip,应该怎么写语句
---------------------------------------------------------------
Request.ServerVariables("REMOTE_ADDR")
---------------------------------------------------------------
这样你什么都可以得到了:
1
2dim objbc
3Set objBC=Server.CreateObject("MSWC.BrowserType")
用户浏览器的版本:``` = objBC.Version
1
2现给你一个较全的:
3
Set objBC=Server.CreateObject("MSWC.BrowserType")
乔本 | ||||
浏览器端相关信息: | ``` = Request.ServerVariables("http_user_agent") ``` | |||
目前网页虚拟路径: | ``` = Request.ServerVariables("path_info") ``` | 本网页的实际路径: | ``` = Request.ServerVariables("path_Translated") ``` | |
服务器端的IP地址: | ``` = Request.ServerVariables("local_addr") ``` | 服务器软件的版本: | ``` = Request.ServerVariables("server_software") ``` | |
服务器连接口编号: | ``` = Request.ServerVariables("server_port") ``` | 服务器的HTTP版本: | ``` = Request.ServerVariables("server_Protocol") ``` | |
远程主机的名称: | ``` = Request.ServerVariables("remote_host") ``` | 远程主机的IP地址: | ``` = Request.ServerVariables("remote_addr") ``` | |
服务器的名称或IP: | ``` = Request.ServerVariables("server_name") ``` | 描述内容的语系: | ``` = Request.ServerVariables("http_accept_language") ``` | |
站点主目录的位置: | ``` = Server.MapPath("/") ``` | 本网页所在位置: | ``` = Server.MapPath("./") ``` | |
本网页上一级目录: | ``` = Server.MapPath("../") ``` | 服务器端CGI版本: | ``` = Request.ServerVariables("gateway_interface") ``` | |
子与母端联机类型: | ``` = Request.ServerVariables("http_connection") ``` | 浏览器端主机名: | ``` = Request.ServerVariables("http_host") ``` | |
用户浏览器的名称: | ``` = objBC.Browser ``` | 用户浏览器的版本: | ``` = objBC.Version ``` | |
是否BETA测试软件: | ``` = objBC.Beta ``` | ActiveXControls: | ``` = objBC.ActiveXControls ``` | |
是否支持背景声音: | ``` = objBC.BackgroundSounds ``` | 是否支持 Cookies: | ``` = objBC.Cookies ``` | |
是否支持框架网页: | ``` = objBC.Frames ``` | 是否支持表格网页: | ``` = objBC.Tables ``` | |
支持 JavaScript: | ``` = objBC.JavaScript ``` | 是否支持VBScript: | ``` = objBC.VBScript ``` |
1
2function browser(info)
3if Instr(info,"MSIE 5.5")>0 then
4browser="Internet Explorer 5.5"
5elseif Instr(info,"MSIE 6.0")>0 then
6browser="Internet Explorer 6.0"
7elseif Instr(info,"MSIE 5.01")>0 then
8browser="Internet Explorer 5.01"
9elseif Instr(info,"MSIE 5.0")>0 then
10browser="Internet Explorer 5.00"
11elseif Instr(info,"MSIE 4.0")>0 then
12browser="Internet Explorer 4.01"
13else
14browser="未知"
15end if
16end function
17function system(info)
18if Instr(info,"NT 5.1")>0 then
19system=system+"Microsoft Windows XP"
20elseif Instr(info,"NT 5")>0 then
21system=system+"Microsoft Windows 2000"
22elseif Instr(info,"NT 4")>0 then
23system=system+"Microsoft Windows NT4"
24elseif Instr(info,"98")>0 then
25system=system+"Microsoft Windows 98"
26elseif Instr(info,"95")>0 then
27system=system+"Microsoft Windows 95"
28else
29system=system+"未知"
30end if
31end function
32Response.write "您的操作系统是:"&system(Request.ServerVariables("HTTP_USER_AGENT"))&"
33"
34Response.write "您的浏览器版本是:"&browser(Request.ServerVariables("HTTP_USER_AGENT"))