Check if iOS version is 3.0 or higher with PHP or Javascript

后端 未结 4 1125
清酒与你
清酒与你 2021-01-23 22:59

I need to check if an iOS device visiting my Website has iOS 3.0 or higher installed. Can I do that?

4条回答
  •  刺人心
    刺人心 (楼主)
    2021-01-23 23:49

    If you wish to check what browser/mobile device is accessing you site - then the answer is that you can use read the userAgent string and search for OS and the number. For example:

    Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7

    and another useful online tool to check your browser UA is: http://whatsmyuseragent.com/

提交回复
热议问题