Reputation: 112
I was found many class for detecting browser but I have problem with some of that, does anybody have easy source for this easy problem:
I want limit user who want work in one application only for Chrome and FF, I will make demo:
if($browser == 'Chrome' OR $browser == 'FF')
{
echo 'All ok';
}else
{
echo 'Not ok, I calling my internal redirection function and redirect user to applimit.php';
}
Upvotes: 0
Views: 110
Reputation: 1258
Use this, to know browser.
echo $_SERVER['HTTP_USER_AGENT'] . "\n\n";
$browser = get_browser(null, true);
print_r($browser);
Upvotes: 1