Block any browser using php

by satheeshkumar 2012-07-17 17:16:16

Block any browser using php code,

$agent = $_SERVER['HTTP_USER_AGENT'];
if (preg_match("/bMSIEb/i", $agent))
{
echo 'You are using IE, you can pass.';
}
else if (preg_match("/bFirefoxb/i", $agent))
{
echo 'You are using Firefox, goodbye.';
exit();
}

?>

Tagged in:

711
like
0
dislike
0
mail
flag

You must LOGIN to add comments