【Asp】Asp超精准判断客户端操作系统类型

  • A+
所属分类:lcx

以下是Asp判断客户端操作系统源码,支持自定义关键词,支持“

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 GetSysVer=GetSysVer & "-Tablet PC(平板电脑)"
if Instr(TheInfo,UCase("Jakarta Commons"))>0 then GetSysVer=GetSysVer & "-Jakarta Commons-HttpClient"
if Instr(TheInfo,UCase("bsalsa.com"))>0 then GetSysVer=GetSysVer & "-[BOT]bsalsa.com(搜索引型)"
End Function

Response.Write GetSysVer
%>

文章来源于lcx.cc:【Asp】Asp超精准判断客户端操作系统类型

相关推荐: 围观—“著名”90后非主流黑客欧欧博客被黑

      “著名”90后非主流黑客欧欧博客被黑,纯属 T00ls.Net 某个普通成员所为,T00ls 众多大牛表示对这次事件毫不不知情,并且 T00ls.Net 不负任何责任。     T00ls.Net 众多大牛对日人站改首页这样的事情,毫不感兴趣,所以…

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: