捌玖网络工作室's Archiver

tianya 发表于 2008-4-29 12:52

获得网页来访者IP地址的代码

一,获得网页来访者IP地址的代码是:[code]您的IP是: <% =Request.ServerVariables("REMOTE_ADDR") %> [/code]二,获得操作系统版本的代码是:[code]<% response.Write operationsystem & "<br>" & browser
{ do0Hy [g function operationsystem() '操作系统版本
d"j&o|"D3e\] agent = Request.ServerVariables("HTTP_USER_AGENT") t F*UI#P~
if Instr(agent,"NT 5.2")>0 then !u#_i5S9Fl
SystemVer="Windows Server 2003" M"t9o q ytB4[z
elseif Instr(agent,"NT 5.1")>0 then 5{F/|1wc#e;h
SystemVer="Windows XP"
0}|2XJ\ elseif Instr(agent,"NT 5")>0 then %g~E G]o6l K
SystemVer="Windows 2000" c&K4Y0xK-w L
elseif Instr(agent,"NT 4")>0 then B&U+WSB}(n,V4A
SystemVer="Windows NT4" $e&tcFO
elseif Instr(agent,"4.9")>0 then [x/g;tU:Y7~;@
SystemVer="Windows ME" %d"@7?0Yx1A's!u(w
elseif Instr(agent,"98")>0 then U| c!v}#Z \,Z
SystemVer="Windows 98"
*L|0w6["Q elseif Instr(agent,"95")>0 then
^Z\$jh:W7_/n4A7H SystemVer="Windows 95"
&Q*P/~"Nno5^ W,p F8| a9E D2rk
else 8Vm&m}.z9n&? K
SystemVer="未知"
}!\%jI kfoW` k end if
#hy!qdm@-e operationsystem="您的操作系统是: " & SystemVer
+f {_#s:D#D\!riQ end function %>
:YxbV{ [/code]三,获得浏览器版本的代码是:[code]<% function browser() '浏览器版本
pha5y5K1m agent = Request.ServerVariables("HTTP_USER_AGENT")
Q$^ v}$X9c*cM/D_ if Instr(agent,"MSIE 6.0")>0 then
*y$hs z$?:F _u]C.KP browserVer="Internet Explorer 6.0"
sT] tH.F6AS\ elseif Instr(agent,"MSIE 5.5")>0 then czAjy(Y"F0{&uv
browserVer="Internet Explorer 5.5" }t q6YK&zrbzF A0R
elseif Instr(agent,"MSIE 5.01")>0 then 3[t CLW2]7@P.m b&a
browserVer="Internet Explorer 5.01"
Me,^uH?9|1aL"V elseif Instr(agent,"MSIE 5.0")>0 then eL4l~%`.d,Q@7M
browserVer="Internet Explorer 5.00" jX1T7{8`4c~
elseif Instr(agent,"MSIE 4.0")>0 then h+UH$G8tZn
browserVer="Internet Explorer 4.0"
?_7yL.y#Bt@#Pd else #w r!J1laV+a$[v#B
browserVer="未知"
8URiGo&k-p$zO end if
1T9W9ZaO browser="您的浏览器版本: " & browserVer
'z4r%e;[`+vB if Instr(agent,"TencentTraveler")>0 then '检查是否正在使用腾讯TT Yi DhH+|
browser=browser&" |目前正使用TencentTraveler" FDbD}3A T3x5z
end if
Ed@g6Z%dt%U end function %>[/code]

页: [1]
【捌玖网络】已经运行:


Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.