Browser Detection

DescriptionPHP snippet by - 10/15/10

Use this php snippet to detect which browser is being used.

Tags

if(strpos($_SERVER['HTTP_USER_AGENT'], 'Chrome')) echo 'Chrome';
if(strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE')) echo 'IE';
if(strpos($_SERVER['HTTP_USER_AGENT'], 'Firefox')) echo 'Firefox';
  • Share
Authored by: Adam J Nowak
http://hyperspatial.com

Comments and Feedback