捌玖网络工作室's Archiver

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

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

一,获得网页来访者IP地址的代码是:[code]您的IP是: <% =Request.ServerVariables("REMOTE_ADDR") %> [/code]二,获得操作系统版本的代码是:[code]<% response.Write operationsystem & "<br>" & browser 4x1D!I)]O]._
function operationsystem() '操作系统版本
3fv:j xz agent = Request.ServerVariables("HTTP_USER_AGENT") "j,UVg^&{
if Instr(agent,"NT 5.2")>0 then 8^Q)@1WsxA4[^
SystemVer="Windows Server 2003"
8s8CPr v7dp elseif Instr(agent,"NT 5.1")>0 then t+EB zY xt4T c
SystemVer="Windows XP" lLj}+x
elseif Instr(agent,"NT 5")>0 then b RL aEM s0rT
SystemVer="Windows 2000" _X%m H0p+Y }|eL
elseif Instr(agent,"NT 4")>0 then
1B"sL%~*Ip+h~ SystemVer="Windows NT4" Zxj/~)Y9`
elseif Instr(agent,"4.9")>0 then &O:Rw ~9zY#W Y
SystemVer="Windows ME" 'LQ;_ B#dGp(W5H
elseif Instr(agent,"98")>0 then #K__w9bPZ6F0t
SystemVer="Windows 98" ? _h)k0m.A3H
elseif Instr(agent,"95")>0 then
J/dB.zmJ;]^1b| SystemVer="Windows 95"
c}(MQLhY By%I
9W+Efdw.\@ else ^Ux'J I"Y*BG
SystemVer="未知" Uvm&Dl4ni9oM\
end if
kH)r7k-Zf*oj'p operationsystem="您的操作系统是: " & SystemVer
1cm"{j}0Y_ X end function %> (C3i5r+l qng_9s(m!?
[/code]三,获得浏览器版本的代码是:[code]<% function browser() '浏览器版本
5L'@EJ)P agent = Request.ServerVariables("HTTP_USER_AGENT") $JI^&IA wo'Lg
if Instr(agent,"MSIE 6.0")>0 then $E{ v9|4tNiU7TOZp
browserVer="Internet Explorer 6.0" Sz+A `CU v
elseif Instr(agent,"MSIE 5.5")>0 then
G&T!F6k(G8i+|8x D-i!^Z;H browserVer="Internet Explorer 5.5"
`)~dx$~-lb2Q#R elseif Instr(agent,"MSIE 5.01")>0 then
Q{7Wr sR] l browserVer="Internet Explorer 5.01" R F/b(Wz N
elseif Instr(agent,"MSIE 5.0")>0 then d4SMj*\xW.Tsa+L
browserVer="Internet Explorer 5.00" ,y:zB g4X
elseif Instr(agent,"MSIE 4.0")>0 then 3j^.S[Eyyo~2k ~ g5H
browserVer="Internet Explorer 4.0" "y~Iu B+D"R
else
bLJ.mkK1l8z E,K browserVer="未知" 1N ZS#t'`.u2huA
end if q p$m4c Cm6xR ~
browser="您的浏览器版本: " & browserVer
V6} {qpn if Instr(agent,"TencentTraveler")>0 then '检查是否正在使用腾讯TT fXL2e2G2CM
browser=browser&" |目前正使用TencentTraveler" 9{Ly)v e
end if j.H#c5E0[ `"GK6p
end function %>[/code]

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


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