日期:2011-12-08 09:49:00 来源:本站整理
Asp超具体显示客户端系统信息[网站编程]
本文“Asp超具体显示客户端系统信息[网站编程]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
Asp超具体显示客户端系统信息源码
- <%
- Function GetReferer() '获得页面来路(支持图片调用方法)
- If Request.ServerVariables("HTTP_REFERER")<>"" Then
- GetReferer = Request.ServerVariables("HTTP_REFERER")
- Else
- If Len(Request.QueryString) <> 0 Then CanShu = "?" & Request.QueryString
- GetReferer = "http://" & Request.Servervariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME") & CanShu
- End If
- End Function
- Function GetIP() '绕过代理获得真实IP
- Dim StrIPAddr
- If Request.ServerVariables("HTTP_X_FORWARDED_FOR") = "" OR InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), "unknown") > 0 Then
- StrIPAddr = Request.ServerVariables("REMOTE_ADDR")
- ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",") > 0 Then
- StrIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ",")-1)
- ElseIf InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";") > 0 Then
- StrIPAddr = Mid(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), 1, InStr(Request.ServerVariables("HTTP_X_FORWARDED_FOR"), ";")-1)
- Else
- StrIPAddr = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
- End If
- GetIP = Trim(Mid(StrIPAddr, 1, 30))
- End Function
- Function GetBrType() '获得浏览器范例(可以判断:47种浏览器;GoogLe,Grub,MSN,Yahoo!蜘蛛;十种常见IE插件)
- Dim StrType, TheInfo, Tmp1, Sysver
- GetBrType = "Other Unknown"
- TheInfo = UCase(Request.ServerVariables("HTTP_USER_AGENT"))
- if Instr(TheInfo,UCase("mozilla"))>0 then GetBrType = "Mozilla"
- if Instr(TheInfo,UCase("icab"))>0 then GetBrType = "iCab"
- if Instr(TheInfo,UCase("lynx"))>0 then GetBrType = "Lynx"
- if Instr(TheInfo,UCase("links"))>0 then GetBrType = "Links"
- if Instr(TheInfo,UCase("elinks"))>0 then GetBrType = "ELinks"
- if Instr(TheInfo,UCase("jbrowser"))>0 then GetBrType = "JBrowser"
- if Instr(TheInfo,UCase("konqueror"))>0 then GetBrType = "konqueror"
- if Instr(TheInfo,UCase("wget"))>0 then GetBrType = "wget"
- if Instr(TheInfo,UCase("ask jeeves"))>0 or Instr(TheInfo,UCase("teoma"))>0 then GetBrType = "Ask Jeeves/Teoma"
- if Instr(TheInfo,UCase("wget"))>0 then GetBrType = "wget"
- if Instr(TheInfo,UCase("opera"))>0 then GetBrType = "opera"
- if Instr(TheInfo,UCase("NOKIAN"))>0 then GetBrType = "NOKIAN(诺基亚手机)"
- if Instr(TheInfo,UCase("SPV"))>0 then GetBrType = "SPV(多普达手机)"
- if Instr(TheInfo,UCase("Jakarta Commons"))>0 then GetBrType = "Jakarta Commons-HttpClient"
- if Instr(TheInfo,UCase("Gecko"))>0 then
- StrType = "[Gecko] "
- GetBrType = "Mozilla Series"
- if Instr(TheInfo,UCase("aol"))>0 then GetBrType = "AOL"
- if Instr(TheInfo,UCase("netscape"))>0 then GetBrType = "Netscape"
- if Instr(TheInfo,UCase("firefox"))>0 then GetBrType = "FireFox"
- if Instr(TheInfo,UCase("chimera"))>0 then GetBrType = "Chimera"
- if Instr(TheInfo,UCase("camino"))>0 then GetBrType = "Camino"
- if Instr(TheInfo,UCase("galeon"))>0 then GetBrType = "Galeon"
- if Instr(TheInfo,UCase("k-meleon"))>0 then GetBrType = "K-Meleon"
- GetBrType = StrType & GetBrType
- end if
- if Instr(TheInfo,UCase("bot"))>0 or Instr(TheInfo,UCase("crawl"))>0 then
- StrType = "[Bot/Crawler]"
- if Instr(TheInfo,UCase("grub"))>0 then GetBrType = "Grub"
- if Instr(TheInfo,UCase("谷歌bot"))>0 then GetBrType = "GoogleBot"
- if Instr(TheInfo,UCase("msnbot"))>0 then GetBrType = "MSN Bot"
- if Instr(TheInfo,UCase("slurp"))>0 then GetBrType = "Yahoo! Slurp"
- GetBrType = StrType & GetBrType
- end if
- if Instr(TheInfo,UCase("applewebkit"))>0 then
- StrType = "[AppleWebKit]"
- GetBrType = ""
- if Instr(TheInfo,UCase("omniweb"))>0 then GetBrType = "OmniWeb"
- if Instr(TheInfo,UCase("safari"))>0 then GetBrType = "Safari"
- GetBrType = StrType & GetBrType
- end if
- if Instr(TheInfo,UCase("msie"))>0 then
- StrType = "[MSIE"
- Tmp1 = mid(TheInfo,(Instr(TheInfo,UCase("MSIE"))+4),6)
- Tmp1 = left(Tmp1,Instr(Tmp1,";")-1)
- StrTypeStrType = StrType & Tmp1 & "]"
- GetBrType = "Internet Explorer"
- GetBrType = StrType & GetBrType
- end if
- if Instr(TheInfo,UCase("msn"))>0 then GetBrType = "MSN"
- if Instr(TheInfo,UCase("aol"))>0 then GetBrType = "AOL"
- if Instr(TheInfo,UCase("webtv"))>0 then GetBrType = "WebTV"
- if Instr(TheInfo,UCase("myie2"))>0 then GetBrType = "MyIE2"
- if Instr(TheInfo,UCase("maxthon"))>0 then GetBrType = "Maxthon(傲游浏览器)"
- if Instr(TheInfo,UCase("gosurf"))>0 then GetBrType = "GoSurf(冲浪高手浏览器)"
- if Instr(TheInfo,UCase("netcaptor"))>0 then GetBrType = "NetCaptor"
- if Instr(TheInfo,UCase("sleipnir"))>0 then GetBrType = "Sleipnir"
- if Instr(TheInfo,UCase("avant browser"))>0 then GetBrType = "AvantBrowser"
- if Instr(TheInfo,UCase("greenbrowser"))>0 then GetBrType = "GreenBrowser"
- if Instr(TheInfo,UCase("slimbrowser"))>0 then GetBrType = "SlimBrowser"
- if Instr(TheInfo,UCase("360SE"))>0 then GetBrTypeGetBrType = GetBrType & "-360SE(360安全浏览器)"
- if Instr(TheInfo,UCase("QQDownload"))>0 then GetBrTypeGetBrType = GetBrType & "-QQDownload(QQ下载器)"
- if Instr(TheInfo,UCase("TheWorld"))>0 then GetBrTypeGetBrType = GetBrType & "-TheWorld(世界之窗浏览器)"
- if Instr(TheInfo,UCase("icafe8"))>0 then GetBrTypeGetBrType = GetBrType & "-icafe8(网维大师网吧管理插件)"
- if Instr(TheInfo,UCase("TencentTraveler"))>0 then GetBrTypeGetBrType = GetBrType & "-TencentTraveler(腾讯TT浏览器)"
- if Instr(TheInfo,UCase("百度ie8"))>0 then GetBrTypeGetBrType = GetBrType & "-百度ie8(百度IE8.0)"
- if Instr(TheInfo,UCase("iCafeMedia"))>0 then GetBrTypeGetBrType = GetBrType & "-iCafeMedia(网吧网媒趋向插件)"
- if Instr(TheInfo,UCase("DigExt"))>0 then GetBrTypeGetBrType = GetBrType & "-DigExt(IE5答应脱机阅读情势特别标志)"
- if Instr(TheInfo,UCase("百度ds"))>0 then GetBrTypeGetBrType = GetBrType & "-百度ds(百度硬盘搜索)"
- if Instr(TheInfo,UCase("CNCDialer"))>0 then GetBrTypeGetBrType = GetBrType & "-CNCDialer(数控拨号)"
- if Instr(TheInfo,UCase("NOKIAN85"))>0 then GetBrTypeGetBrType = GetBrType & "-NOKIAN85(诺基亚手机)"
- if Instr(TheInfo,UCase("SPV_C600"))>0 then GetBrTypeGetBrType = GetBrType & "-SPV_C600(多普达C600)"
- if Instr(TheInfo,UCase("Smartphone"))>0 then GetBrTypeGetBrType = GetBrType & "-Smartphone(Windows Mobile for Smartphone Edition 操作系统的智妙手机)"
- End Function
- Function GetSysVer() '获得系统范例(可以判断:29种操作系统(包含手机))
- GetSysVer="Other Unknown"
- TheInfo = UCase(Request.ServerVariables("HTTP_USER_AGENT"))
- if Instr(TheInfo,UCase("x11"))>0 or Instr(TheInfo,UCase("Unix"))>0 then GetSysVer="Unix"
- if Instr(TheInfo,UCase("Sunos"))>0 or Instr(TheInfo,UCase("SUN OS"))>0 then GetSysVer="SUN OS"
- if Instr(TheInfo,UCase("PowerPC"))>0 or Instr(TheInfo,UCase("PPC"))>0 then GetSysVer="PowerPC"
- if Instr(TheInfo,UCase("Macintosh"))>0 then GetSysVer="Mac"
- if Instr(TheInfo,UCase("Mac OSX"))>0 then GetSysVer="MacOSX"
- if Instr(TheInfo,UCase("FreeBSD"))>0 then GetSysVer="FreeBSD"
- if Instr(TheInfo,UCase("Linux"))>0 then GetSysVer="Linux"
- if Instr(TheInfo,UCase("Palmsource"))>0 or Instr(TheInfo,UCase("PalmOS"))>0 then GetSysVer="PalmOS"
- if Instr(TheInfo,UCase("WAP"))>0 then GetSysVer="WAP Mobile Phone"
- if Instr(TheInfo,UCase("Win98"))>0 then GetSysVer="Win 98"
- if Instr(TheInfo,UCase("NOKIAN"))>0 then GetSysVer="NOKIAN(诺基亚手机)"
- if Instr(TheInfo,UCase("Media Center"))>0 then GetSysVer="Windows XP Media Center PC"
- if Instr(TheInfo,UCase("Windows"))>0 then
- GetSysVer="Windows Series"
- if Instr(TheInfo,UCase("Windows CE"))>0 then GetSysVer="Windows CE"
- if Instr(TheInfo,UCase("Windows 95"))>0 then GetSysVer="Windows 95"
- if Instr(TheInfo,UCase("Windows 98"))>0 then GetSysVer="Windows 98"
- if Instr(TheInfo,UCase("Windows 2000"))>0 then GetSysVer="Windows 2000"
- if Instr(TheInfo,UCase("Windows XP"))>0 then GetSysVer="Windows XP"
- if Instr(TheInfo,UCase("Windows NT"))>0 then
- GetSysVer="Windows NT Series"
- if Instr(TheInfo,UCase("Windows NT 4.0"))>0 then GetSysVer="Windows 9x/98/95"
- if Instr(TheInfo,UCase("Windows NT 5.0"))>0 then GetSysVer="Windows 2000"
- if Instr(TheInfo,UCase("Windows NT 5.1"))>0 then GetSysVer="Windows XP"
- if Instr(TheInfo,UCase("Windows NT 5.2"))>0 then GetSysVer="Windows Server 2003"
- if Instr(TheInfo,UCase("Windows NT 6.0"))>0 then GetSysVer="Windows Vista/Windows Server 2008"
- if Instr(TheInfo,UCase("Windows NT 6.1"))>0 then GetSysVer="Windows Server 2008 R2/Windows 7 Series"
- end if
- end if
- if Instr(TheInfo,UCase("Tablet PC"))>0 then GetSysVerGetSysVer=GetSysVer & "-Tablet PC(平板电脑)"
- if Instr(TheInfo,UCase("Jakarta Commons"))>0 then GetSysVerGetSysVer=GetSysVer & "-Jakarta Commons-HttpClient"
- if Instr(TheInfo,UCase("bsalsa.com"))>0 then GetSysVerGetSysVer=GetSysVer & "-[BOT]bsalsa.com(搜索引型)"
- End Function
- Response.Write "真实IP:" & GetIP() & "<br>"
- Response.Write "代理IP:" & Request.ServerVariables("REMOTE_ADDR") & "<br>"
- Response.Write "拜候时间:" & Date() & " " & Time() & "<br>"
- Response.Write "系统:" & GetSysVer & "<br>"
- Response.Write "语言:" & Request.ServerVariables("Http_Accept_Language") & "<br>"
- Response.Write "浏览器:" & GetBrType & "<br>"
- Response.Write "URL编码:" & Request.ServerVariables("Http_Accept_Encoding") & "<br>"
- Response.Write "方法:" & Request.ServerVariables("Request_Method") & "<br>"
- Response.Write "目标IP:" & Request.ServerVariables("LOCAL_ADDR") & "<br>"
- Response.Write "拜候地址:" & GetReferer & "<br>"
- Response.Write "用户信息:" & Request.ServerVariables("Http_User_Agent") & "<br>"
- Response.End
- %>
以上是“Asp超具体显示客户端系统信息[网站编程]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论