peps03
asked on
Detect Goolge Chrome browser not working
Hi,
I'm tring to detect the google chrome browser like this:
<? if (strpos($_SERVER['HTTP_USE R_AGENT'], 'chrome') !== FALSE)
echo "you're chrome..";
else
echo "not using google chrome.....!";?>
But it doesn't work..
This does work:
<? if (strpos($_SERVER['HTTP_USE R_AGENT'], 'MSIE') !== FALSE)
echo "you're ie..";
else
echo "no ie!";?>
What am i doing wrong? I would says its in the name "chrome" because the code is the same..
Thanks
I'm tring to detect the google chrome browser like this:
<? if (strpos($_SERVER['HTTP_USE
echo "you're chrome..";
else
echo "not using google chrome.....!";?>
But it doesn't work..
This does work:
<? if (strpos($_SERVER['HTTP_USE
echo "you're ie..";
else
echo "no ie!";?>
What am i doing wrong? I would says its in the name "chrome" because the code is the same..
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Decorum!!
Its finally working the way i want it to!
Its finally working the way i want it to!
if ( eregi("chrome", $_SERVER['HTTP_USER_AGENT'
// Google chrome
} else {
// Not Google chrome
}