获得网页来访者IP地址的代码
一,获得网页来访者IP地址的代码是:[code]您的IP是: <% =Request.ServerVariables("REMOTE_ADDR") %> [/code]二,获得操作系统版本的代码是:[code]<% response.Write operationsystem & "<br>" & browserfunction operationsystem() '操作系统版本 sYTV#v
agent = Request.ServerVariables("HTTP_USER_AGENT") `1L[s7~{ C?L3G
if Instr(agent,"NT 5.2")>0 then
SystemVer="Windows Server 2003" +l]Y;Trn]6q0L1i}$D
elseif Instr(agent,"NT 5.1")>0 then
SystemVer="Windows XP"
elseif Instr(agent,"NT 5")>0 then
SystemVer="Windows 2000"
elseif Instr(agent,"NT 4")>0 then
SystemVer="Windows NT4"
elseif Instr(agent,"4.9")>0 then
SystemVer="Windows ME" "xeQ&A` \$[l
elseif Instr(agent,"98")>0 then
SystemVer="Windows 98"
elseif Instr(agent,"95")>0 then k?9j/y0QYm$V3i
SystemVer="Windows 95" /fcD2o E wA_"F
o8M)z$C7x
else /JX)Deu.ar.gf#i;~
SystemVer="未知"
end if n3Di fh{
operationsystem="您的操作系统是: " & SystemVer
end function %> iu+F KVbX
[/code]三,获得浏览器版本的代码是:[code]<% function browser() '浏览器版本
agent = Request.ServerVariables("HTTP_USER_AGENT")
if Instr(agent,"MSIE 6.0")>0 then
browserVer="Internet Explorer 6.0" /J'y7zAM-a9\Z
elseif Instr(agent,"MSIE 5.5")>0 then 4N b| _6\Jd ^ B9TA5U
browserVer="Internet Explorer 5.5"
elseif Instr(agent,"MSIE 5.01")>0 then 4o!b'{-L5P
browserVer="Internet Explorer 5.01"
elseif Instr(agent,"MSIE 5.0")>0 then
browserVer="Internet Explorer 5.00"
elseif Instr(agent,"MSIE 4.0")>0 then