The other day i was coding arround and i found that i need to know if the user is using the new shiny browser chrome. So for that i wrote a small snippet and wanted to share with you guys. Here is how we do in php.

function is_chrome()
{
return(eregi("chrome", $_SERVER['HTTP_USER_AGENT']));
}
 
if(is_chrome())
{
// do something if its chrome
 
echo 'You are using Google Chrome Browser.';
}

cheers !!
Realin !

Share this post: