Wednesday, June 18, 2008

Browser detect using user agent

$browser = $_SERVER['HTTP_USER_AGENT'] . "\n\n";
$type = "Firefox";

if(stristr($browser, $type) === FALSE) {
echo "
";
echo "Please use Firefox. Other Browsers may not display content in the intended manner.
To download a free copy please visit: http://getfirefox.com/
";
}

0 comments: