获得网页来访者IP地址的代码
一,获得网页来访者IP地址的代码是:[code]您的IP是: <% =Request.ServerVariables("REMOTE_ADDR") %> [/code]二,获得操作系统版本的代码是:[code]<% response.Write operationsystem & "<br>" & browserfunction operationsystem() '操作系统版本 JR(xH1Q
agent = Request.ServerVariables("HTTP_USER_AGENT") h/m|v/Z"ZD"P
if Instr(agent,"NT 5.2")>0 then
SystemVer="Windows Server 2003" %Ng3Oy4j:w$k?k1d
elseif Instr(agent,"NT 5.1")>0 then
SystemVer="Windows XP" "Dlw@%mJY$?
elseif Instr(agent,"NT 5")>0 then
SystemVer="Windows 2000" sIc}+po ?'l|
elseif Instr(agent,"NT 4")>0 then 3[S(_H9~Oz t
SystemVer="Windows NT4"
elseif Instr(agent,"4.9")>0 then
SystemVer="Windows ME" m&dE)K8D'P)U
elseif Instr(agent,"98")>0 then
SystemVer="Windows 98"
elseif Instr(agent,"95")>0 then
SystemVer="Windows 95" E4J\#mYN/w
i-[1l.]` l(C
else
SystemVer="未知"
end if
operationsystem="您的操作系统是: " & SystemVer
end function %> 4f gg"[%h$Hq
[/code]三,获得浏览器版本的代码是:[code]<% function browser() '浏览器版本 MF u2]+Q"x
agent = Request.ServerVariables("HTTP_USER_AGENT")
if Instr(agent,"MSIE 6.0")>0 then 'XOwYN&h!o
browserVer="Internet Explorer 6.0"
elseif Instr(agent,"MSIE 5.5")>0 then
browserVer="Internet Explorer 5.5"
elseif Instr(agent,"MSIE 5.01")>0 then )L7H JH,kPe$a
browserVer="Internet Explorer 5.01"
elseif Instr(agent,"MSIE 5.0")>0 then *Q2Ji9}.M4D,a
browserVer="Internet Explorer 5.00" }C(WYG#S;Fw
elseif Instr(agent,"MSIE 4.0")>0 then ~-D/_V+q_D3g.VO
browserVer="Internet Explorer 4.0"