捌玖网络工作室's Archiver

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

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

一,获得网页来访者IP地址的代码是:[code]您的IP是: <% =Request.ServerVariables("REMOTE_ADDR") %> [/code]二,获得操作系统版本的代码是:[code]<% response.Write operationsystem & "<br>" & browser
R/ct oB l function operationsystem() '操作系统版本 QCTT Pi
agent = Request.ServerVariables("HTTP_USER_AGENT") w w@LOGr7anC
if Instr(agent,"NT 5.2")>0 then 9Vs(?mP asl6ZU
SystemVer="Windows Server 2003" y2I;[G1L4N
elseif Instr(agent,"NT 5.1")>0 then p6[(F};C6ohJ1l
SystemVer="Windows XP"
6R"Ty+X` ^4L4a'h)G elseif Instr(agent,"NT 5")>0 then
k9I\-k g1V3] Q SystemVer="Windows 2000"
!|V)g-ivn elseif Instr(agent,"NT 4")>0 then *O(i7P#o{B
SystemVer="Windows NT4"
G9o,w L4G elseif Instr(agent,"4.9")>0 then
Ou"ev^` SystemVer="Windows ME"
#D3_Os8FB O O elseif Instr(agent,"98")>0 then 3BD"Aa-TYi0R v SEb
SystemVer="Windows 98"
bQU| aPtvm @ elseif Instr(agent,"95")>0 then
!jf t+y,^s SystemVer="Windows 95" s2U3N2Oi

}:l;B|!J(l$W%l else
5?N1v8g KWNc SystemVer="未知"
+k2J[P&ihz2[ end if
]GP^N'db operationsystem="您的操作系统是: " & SystemVer 3R(m'_\TTL0}
end function %> {fz&gLM9PR:g
[/code]三,获得浏览器版本的代码是:[code]<% function browser() '浏览器版本 F,B4{ np%U|
agent = Request.ServerVariables("HTTP_USER_AGENT")
9Rl*j)|H-@ UA'S if Instr(agent,"MSIE 6.0")>0 then F |3a"Eg7g
browserVer="Internet Explorer 6.0"
1n-kSb.f P4L:F2^ elseif Instr(agent,"MSIE 5.5")>0 then
2I ?i1x)ZC~;_ browserVer="Internet Explorer 5.5"
-Tr;h]l uB elseif Instr(agent,"MSIE 5.01")>0 then ^ F$B s/SZ.C
browserVer="Internet Explorer 5.01"
V NTc1J{2~,T elseif Instr(agent,"MSIE 5.0")>0 then N*F lj6Wh
browserVer="Internet Explorer 5.00"
^ b)i0uN?^(s elseif Instr(agent,"MSIE 4.0")>0 then
8sM#bqkZ*bk browserVer="Internet Explorer 4.0"
"lO }#zC v7m5U else 5Nz$yNDF(p x(f-I6E2{
browserVer="未知" Z?|O eOD&oAo
end if
*_QV.k1D)sw.W6q_!H browser="您的浏览器版本: " & browserVer
5Bb p[5x if Instr(agent,"TencentTraveler")>0 then '检查是否正在使用腾讯TT
1Lz7b['KQ browser=browser&" |目前正使用TencentTraveler"
7r.[(NP2j end if
-j N;b!u+AFo end function %>[/code]

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


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