Asp超精准判断客户端操作系统类型代码
分类:程序开发 Tags: asp 操作系统 评论:0 浏览:3827 最近更新时间:2014/8/23 13:34:38
以下是Asp判断客户端操作系统源码,支持自定义关键词,支持“<img”方式调用:
<% 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 %>
转载自:http://lcx.cc/?i=481
本文地址:/515/
-
• ASP提交Post数据到远程网站的方法
• win2003空间支持access2007、2010数据库.accdb的方法
• ASP经常用到的代码,比较全,不可不看!
• ASP输出26个英文字母的方法代码
• ASP数据库连接、显示、添加、删除、查询等简单操作教程
• ASP几种常见分页代码
• asp使用CDO.Message发送邮件详细代码集合
• Asp超精准判断客户端浏览器类型代码
• IE6中使用first-letter首字符css的特殊写法
• ASP实现点击链接直接下载文件的代码
-
• ASP判断手机号码输入是否正确正则代码
• 解决XP系统IIS5.0 报Server Application Error错误方法,亲自测试可用
• ASP连接Access数据库绝对路径代码
• 如何让网站”HTTP 500内部服务器错误“显示为具体的错误信息?
• 李阳疯狂英语900句文本601-750(在线阅读/电子书下载)
• 如何熄灭/关闭点亮的QQ图标?
• 淘宝网店促销揽生意的方法
• 2014年最新Godaddy优惠码,域名、空间、SSL等购买注册续费优惠码,支持支付宝付款
• 淘宝经验-如何只花300元加入消费者保障服务(消保)?
• 李阳发音突破掌上宝文本(在线阅读/电子书下载)