开发者

Detecting browsers current version or better PHP

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜