获得网页来访者IP地址的代码
一,获得网页来访者IP地址的代码是:[code]您的IP是: <% =Request.ServerVariables("REMOTE_ADDR") %> [/code]二,获得操作系统版本的代码是:[code]<% response.Write operationsystem & "<br>" & browserfunction operationsystem() '操作系统版本
agent = Request.ServerVariables("HTTP_USER_AGENT") g8N]E hr9r
if Instr(agent,"NT 5.2")>0 then ^[7Xf m0b3i1EYj7B
SystemVer="Windows Server 2003" 8sORo.| aG slCD_
elseif Instr(agent,"NT 5.1")>0 then
SystemVer="Windows XP"
elseif Instr(agent,"NT 5")>0 then
SystemVer="Windows 2000" tPl uon,bN
elseif Instr(agent,"NT 4")>0 then .?^8vN}3wz~
SystemVer="Windows NT4" 5R&^%N0Px:c#U@
elseif Instr(agent,"4.9")>0 then
SystemVer="Windows ME" -B zyKQ;^7teGh
elseif Instr(agent,"98")>0 then ;Bp:T)~t(d@1w E0Q$t
SystemVer="Windows 98" m1Q;m$jeA#A
elseif Instr(agent,"95")>0 then G*AZ#EBXrv4@
SystemVer="Windows 95"
else
SystemVer="未知" ht;Xy_5\n!Z"b
end if
operationsystem="您的操作系统是: " & SystemVer
end function %> s_`z3PB9g
[/code]三,获得浏览器版本的代码是:[code]<% function browser() '浏览器版本 3o;qg(})e K
agent = Request.ServerVariables("HTTP_USER_AGENT") "c"z-g"Z h.i
if Instr(agent,"MSIE 6.0")>0 then
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
browserVer="Internet Explorer 5.01"
elseif Instr(agent,"MSIE 5.0")>0 then
browserVer="Internet Explorer 5.00" W$PrA;Wf%N
elseif Instr(agent,"MSIE 4.0")>0 then