How to get exact browser name and version?

前端 未结 9 1609
猫巷女王i
猫巷女王i 2020-12-02 06:59

I have tried some solutions but I am unable to get exact name and version:

I am trying following code:

$browserAgent = $_SERVER[\'HT         


        
9条回答
  •  一生所求
    2020-12-02 07:49

    Use 51Degrees.com device detection solution to detect browser name, vendor and version.

    First, follow the 4-step guide to incorporate device detector in to your project. When I say incorporate I mean download archive with PHP code and database file, extract them and include 2 files. That's all there is to do to incorporate.

    Once that's done you can use the following properties to get browser information:
    $_51d['BrowserName'] - Gives you the name of the browser (Safari, Molto, Motorola, MStarBrowser etc).
    $_51d['BrowserVendor'] - Gives you the company who created browser.
    $_51d['BrowserVersion'] - Version number of the browser

提交回复
热议问题