 <p><a href="http://nerds.palmdrive.net/useragent/code.html" rel="nofollow noreferrer" title="User-Agent detection: The Code">User-Agent detection</a> code is quite old (stops at IE6) but should be easily extended. Should be combined with R. Gagnon code pointed by Filip, for better detection of real browser (some browsers allows to alter user agent string at will).<br> You might be interested by the <a href="http://www.useragentstring.com/pages/useragentstring.php" rel="nofollow noreferrer" title="UserAgentString.com - List of User Agent Strings">List of User Agent Strings</a> too.</p>