![]() |
#2
yms1232010-06-01 22:56
<select name="UsSystem" style="width:465px ">
<% Function UsBrowser(info) Dim browser browser="" IF Instr(info,"NetCaptor 6.5.0")>0 Then browser="浏览器:NetCaptor 6.5.0" End IF IF Instr(info,"MyIe 3.1")>0 Then browser="浏览器:MyIe 3.1" End IF IF Instr(info,"NetCaptor 6.5.0RC1")>0 Then browser="浏览器:NetCaptor 6.5.0RC1" End IF IF Instr(info,"NetCaptor 6.5.PB1")>0 Then browser="浏览器:NetCaptor 6.5.PB1" End IF IF Instr(info,"MSIE 5.5")>0 Then browser="浏览器:Internet Explorer 5.5" End IF IF Instr(info,"MSIE 6.0")>0 Then browser="浏览器:Internet Explorer 6.0" End IF IF Instr(info,"MSIE 6.0b")>0 Then browser="浏览器:Internet Explorer 6.0b" End IF IF Instr(info,"MSIE 5.01")>0 Then browser="浏览器:Internet Explorer 5.01" End IF IF Instr(info,"MSIE 5.0")>0 Then browser="浏览器:Internet Explorer 5.00" End IF IF Instr(info,"MSIE 4.0")>0 Then browser="浏览器:Internet Explorer 4.01" End IF IF browser="" Then browser="浏览器:未知" End IF UsBrowser=browser End Function Function UsSystem(info) Dim system system="" If Instr(info,"NT 5.1")>0 Then system=system+"操作系统:Windows XP" End IF IF Instr(info,"Tel")>0 Then system=system+"操作系统:Telport" End IF IF Instr(info,"webzip")>0 Then system=system+"操作系统:webzip" End IF IF Instr(info,"flashget")>0 Then system=system+"操作系统:flashget" End IF IF Instr(info,"offline")>0 Then system=system+"操作系统:offline" End IF IF Instr(info,"NT 5")>0 then system=system+"操作系统:Windows 2000" End IF IF Instr(info,"NT 4")>0 Then system=system+"操作系统:Windows NT 4.0" End IF IF Instr(info,"98")>0 Then system=system+"操作系统:Windows 98" End IF IF Instr(info,"95")>0 Then system=system+"操作系统:Windows 95" End If IF Instr(info,"NT 5.1")>0 Then system=system+"操作系统:Windows XP" End IF IF Instr(info,"NT 5.2")>0 Then system=system+"操作系统:Windows SERVER 2003" End IF IF system="" Then system=system+"操作系统:未知" End IF UsSystem=system End Function Response.Write "<option selected>"&UsBrowser(Request.ServerVariables("HTTP_USER_AGENT"))&"</option>"&Chr(13) Response.Write "<option>IP地址:"&Request.ServerVariables("REMOTE_ADDR")&"</option>"&Chr(13) Response.Write "<option>"&UsSystem(Request.ServerVariables("HTTP_USER_AGENT"))&"</option>"&Chr(13) 'Response.Write "<option>CPU型号:"&Request.ServerVariables("HTTP_UA_CPU")&"</option>"&Chr(13) 'Response.Write "<option>显示器分辨率:"&Request.ServerVariables("HTTP_UA_PIXELS")&"</option>"&Chr(13) %> </select> 以前写的给楼主参考 |
<body>
<%
function system(text)
if instr(text,"nt 5.2")>0 then
system="windows 2003"
elseif instr(text,"nt 5.1")>0 then
system="windows xp"
elseif instr(text,"nt 5")>0 then
system="windows 2000"
elseif instr(text,"nt 4")>0 then
system="windows nt4"
elseif instr(text,"nt 4.9")>0 then
system="windows 4.9"
elseif instr(text,"nt me")>0 then
system="windows me"
elseif instr(text,"nt 98")>0 then
system="windows 98"
elseif instr(text,"nt 95")>0 then
system="windows 95"
else
system="未知"
end if
end function
function browser (text)
if instr(text,"MSIE6.0")>0 then
browser ="internet Ezplorer 6.0"
elseif instr(text,"MSIE5.5")>0 then
browser ="internet Ezplorer 5.5"
elseif instr(text,"MSIE5.01")>0 then
browser ="internet Ezplorer 5.01"
elseif instr(text,"MSIE5.0")>0 then
browser ="internet Ezplorer 5.0"
elseif instr(text,"MSIE4.0")>0 then
browser ="internet Ezplorer 4.0"
else browser="unknown"
end if
end function
ip=request.ServerVariables("remote addr")
os ie=request.ServerVariables("http user agent")
os=system(os ie)
ie=browser(os ie)
iip array=split(ip,".")
iip=iip array(0)&"."&iip array(1)&"."&iip array(2)&".*"
ip=mid(ip,1,instrrev(ip,"."))&"*"
response.write"访问者的ip:"&ip&"<br>"
response.write"访问者的机器环境:"&os ie&"<br>"
response.write"访问者的炒作系统:"&os&"<br>"
response.write"访问者的浏览器型号"&ie&"<br>"
%>
</body>
</html>
这个有什么问题啊?