Determine Browser's Version

后端 未结 4 1395
小鲜肉
小鲜肉 2020-12-04 04:05

How do I get the browser version? I have done the browser detection part but every browser have different algorithm of its version release and its hard to get it. I already

相关标签:
4条回答
  • 2020-12-04 04:48

    You can get it easily with get_browser()

    <?php
    $browser = get_browser();
    $version = $browser->version;
    
    0 讨论(0)
  • 2020-12-04 04:50

    I have found PPK's JavaScript-based browser detection code to be very reliable.

    0 讨论(0)
  • 2020-12-04 05:03

    A google search for 'php browser version detection' return get_browser() as the first result. Please search before posting.

    0 讨论(0)
  • 2020-12-04 05:05

    Your only chance is to grab the User-Agent from the $_SERVER array. And there is no rule that forces a browser to include its version.

    0 讨论(0)
提交回复
热议问题