title: How does HTTP_USER_AGENT function?
body: <p>When I get the PHP server variable <code>HTTP_USER_AGENT</code> with this code:</p>
  <pre><code>&lt;?php
     $useragent = $_SERVER ['HTTP_USER_AGENT'];
     echo &quot;&lt;b&gt;Your User Agent is&lt;/b&gt;: &quot; . $useragent;
  ?&gt;
  </code></pre>
  <p>I get this in Google Chrome:</p>
  <blockquote>
  <p>Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.4 (KHTML, like Gecko) Chrome/22.0.1229.94 Safari/537.4</p>
  </blockquote>
  <p>This in Firefox:</p>
  <blockquote>
  <p>Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20100101 Firefox/16.0</p>
  </blockquote>
  <p>And this in IE:</p>
  <blockquote>
  <p>Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; BOIE9;NLNL)</p>
  </blockquote>
  <p>My obvious question is: how does this work? Why does my user-agent say Mozilla and Windows NT while I am using Google Chrome?</p>
  <p>Also, why does it say that I use Firefox when I am using IE?</p>