title: How can I detect a visitor's browser using PHP?
body: <p>Followed the steps presented on <a href="https://www.thenewboston.com/videos.php?video=17054" rel="nofollow noreferrer">Beginner PHP Tutorial - How To Detect a Visitors Browser
  </a> and got different result. </p>
  
  <h2><strong><em>Run the following code:</em></strong></h2>
  
  <pre><code>&lt;?php
    $browser = get_browser(null, true);
    echo $browser['browser'];
  ?&gt;
  </code></pre>
  
  <h2><strong><em>Result on Google Chrome:</em><br/></strong></h2>
  
  <p><img src="https://i.stack.imgur.com/ixydn.jpg" alt="Result on Google Chrome"> <br/>
  Instead of displaying <em>Chrome</em>, the browser displayed <em>Default Browser</em>.</p>
  
  <h2><strong>Files in my folder:</strong><br/></h2>
  
  <ul>
  <li><em>browscap.ini</em>  - C:\xampp\php\extras</li>
  <li><em>php.ini</em> - clearly specified the path of browscap.ini as shown below;</li>
  </ul>
  
  <p>[browscap]<br/>
  ; <a href="http://php.net/browscap" rel="nofollow noreferrer">http://php.net/browscap</a><br/>
  browscap="C:\xampp\php\extras\browscap.ini"</p>
  
  <p>What should I do to get the correct type of browser to be displayed on the page?</p>