开发者

Detecting browsers current version or better PHP

开发者 https://www.devze.com 2023-04-13 05:41 出处:网络
I am looking for a way to detect whether a user is using certain kinds of browsers on their system. In this example I want to be able to detect:

I am looking for a way to detect whether a user is using certain kinds of browsers on their system. In this example I want to be able to detect:

  • IOS 5 or greater for both iPhone or iPAD
  • iOS 4 or inferior
  • Android
  • Safari and Chrome
  • Firefox
  • Internet Explorer

The only one I know how to create is to detect any version of IE

if(strpos($_SERVER['HTTP_USER_AGENT'], 'iOS 5_0') !== false) { }

So What I need is:

  • How to detect browsers
  • How to assess whether it is a a certain version newer or older

Someone mentioned before the get_browser functi开发者_StackOverflow社区on but I don't understand who to use this ini file and need a good explanation on how to do it if that is the best approach.

0

精彩评论

暂无评论...
验证码 换一张
取 消