06

User-Agent 汇总

目录:

  1. Android:
    Android 0.*
    Android 1.*
    Android 2.*
    Android 3.*
    Android 4.*
  2. Windows Phone OS
  3. BlackBerry
  4. SymbianOS:
    SymbianOS 3.*
    SymbianOS 6.*
    SymbianOS 7.*
    SymbianOS 8.*
    SymbianOS 9.*
  5. iPhone OS:
    iPhone OS 2_*
    iPhone OS 3_*
    iPhone OS 4_*
    iPhone OS 5_*
    iPhone(others)
  6. Mac OS X:
    Mac OS X 10_5*
    Mac OS X 10_6*
    Mac OS X 10_7*
    Mac OS X 10_8*
    Mac OS X 10_9*
    Mac OS X 10_10*
    Mac OS X(others)
  7. Wap
  8. UP浏览器(老版手机)
  9. X系统(一种老版系统)
  10. 含CLDC:
  11. Windows:
    Windows 2000
    Windows XP
    Windows Server 2003
    Windows 7
    Windows 8

Continue reading

十一 06

PHP使用$_SERVER['HTTP_USER_AGENT'];获取User Agent信息,另附JS方法

PHP使用$_SERVER['HTTP_USER_AGENT'];获取User Agent信息,通过查找信息的异同并加以判断语句来实现只允许页面在微信内置浏览器打开,或只允许在手机QQ内置浏览器打开,或其它浏览器打开等。

安卓系统

手机UC浏览器:
Mozilla/5.0 (Linux; U; Android 4.2.2; zh-CN; Hol-T00 Build/HUAWEIHol-T00) AppleWebKit/534.30 (KHTML, like Gecko) Version/4.0 UCBrowser/10.7.5.655 U3/0.8.0 Mobile Safari/534.30

手机QQ浏览器:
Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; Hol-T00 Build/HUAWEIHol-T00) AppleWebKit/537.36 (KHTML, like Gecko)Version/4.0 MQQBrowser/6.1 Mobile Safari/537.36

手机QQ内置浏览器:
Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; Hol-T00 Build/HUAWEIHol-T00) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 MQQBrowser/5.4 TBS/025477 Mobile Safari/533.1 V1_AND_SQ_5.9.1_272_YYB_D QQ/5.9.1.2535 NetType/WIFI WebP/0.3.0 Pixel/720

微信内置浏览器:
Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; Hol-T00 Build/HUAWEIHol-T00) AppleWebKit/533.1 (KHTML, like Gecko)Version/4.0 MQQBrowser/5.4 TBS/025478 Mobile Safari/533.1 MicroMessenger/6.3.5.50_r1573191.640 NetType/WIFI Language/zh_CN

手机百度:
Mozilla/5.0 (Linux; U; Android 4.2.2; zh-cn; Hol-T00 Build/HUAWEIHol-T00) AppleWebKit/534.24 (KHTML, like Gecko) Version/4.0 Mobile Safari/534.24 T5/2.0 baiduboxapp/6.9.1 (Baidu; P1 4.2.2)

IOS系统

微信内置浏览器:(iPhone 4S)
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13B143 MicroMessenger/6.3.6 NetType/WIFI Language/zh_CN

手机QQ内置浏览器:(iPhone 4S)
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13B143 MicroMessenger/6.3.6 NetType/WIFI Language/zh_CN

手机QQ内置浏览器:(iPhone plus)
Mozilla/5.0 (iPhone; CPU iPhone OS 8_2 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Mobile/12D508 QQ/5.9.1.405 Pixel/1080 NetType/WIFI Mem/132

手机QQ内置浏览器:(iPhone plus)
Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Mobile/13B143 QQ/5.9.1.405 Pixel/1080 NetType/2G Mem/208

JavaScript和PHP获取后判断信息方法如下:
Continue reading