Could anyone tell me the best way to detect a browser using php? IE 6 and 7 are terrible when it comes to achieving full browser compatibility with CSS so my site isn\'t going t
The Best way to detect the browser is to use the php class given below. i created this for my website a year ago. It works with chrome, firefox,opera and internet explorer.
$name,
'version' => $version,
);
}
}
$browser = Browser::detect();
echo 'You browser is '.$browser['name'].' version '.$browser['version'];
echo "
";
?>