FeralReason Posted June 7, 2010 Share Posted June 7, 2010 Any help on this would be appreciated ! When I echo $_SERVER['HTTP_USER_AGENT']; I get the following: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 ( .NET CLR 3.5.30729) I can clearly tell from this that I am using Firefox 3.5.9. HOWEVER, when I use get_browser(), I get back an array that has no reference (that I can understand) to Firefox 3.5.9. How come ?? Here's a dump of my get_browser() output. browser_name_regex - ^mozilla/5\.0 (windows; .; windows nt 5\.1; .*rv:1\.9.*) gecko/.*$ browser_name_pattern - Mozilla/5.0 (Windows; ?; Windows NT 5.1; *rv:1.9*) Gecko/* parent - Mozilla 1.9 platform - WinXP win32 - 1 browser - Mozilla version - 1.9 majorver - 1 minorver - 9 alpha - 1 frames - 1 iframes - 1 tables - 1 cookies - 1 javaapplets - 1 javascript - 1 cssversion - 2 supportscss - 1 beta - win16 - win64 - backgroundsounds - cdf - vbscript - activexcontrols - isbanned - ismobiledevice - issyndicationreader - crawler - aol - aolversion - 0 (I'm testing this from localhost on xampp. Still trying to get my live server to change the php.ini file so that I can see browscap.ini but I'm guessing this should make no difference.) Thanx, Glenn Quote Link to comment https://forums.phpfreaks.com/topic/204087-get_browser-not-matching-http_user_agent/ Share on other sites More sharing options...
ignace Posted June 7, 2010 Share Posted June 7, 2010 Download a newer version of browscap.ini@http://browsers.garykeith.com/downloads.asp Quote Link to comment https://forums.phpfreaks.com/topic/204087-get_browser-not-matching-http_user_agent/#findComment-1068952 Share on other sites More sharing options...
FeralReason Posted June 7, 2010 Author Share Posted June 7, 2010 Thanks for the quick reply. The output I have posted is already from that browcap.ini. I had already downloaded it this morning. (That was my first guess too.) Is there, by any chance, a newer one than that. Thanx, Glenn Quote Link to comment https://forums.phpfreaks.com/topic/204087-get_browser-not-matching-http_user_agent/#findComment-1068967 Share on other sites More sharing options...
FeralReason Posted June 7, 2010 Author Share Posted June 7, 2010 Should have included this: The version of browscap I downloaded was php_browscap.ini (http://browsers.garykeith.com/stream.asp?PHP_BrowsCapINI.) Is there a better one ? Thanx, Glenn Quote Link to comment https://forums.phpfreaks.com/topic/204087-get_browser-not-matching-http_user_agent/#findComment-1069005 Share on other sites More sharing options...
FeralReason Posted June 7, 2010 Author Share Posted June 7, 2010 Alright -- never mind. Don't know what happened but it is working now. Perhaps the previous output was from the older browscap.ini. At any rate, this is the output I now get, which looks fine: browser_name_regex - ^mozilla/5\.0 (windows; .*; windows nt 5\.1; .*; rv:1\.9\..*) gecko/.* firefox/3\.5.*$ browser_name_pattern - Mozilla/5.0 (Windows; *; Windows NT 5.1; *; rv:1.9.*) Gecko/* Firefox/3.5* parent - Firefox 3.5 platform - WinXP win32 - 1 browser - Firefox version - 3.5 majorver - 3 minorver - 5 frames - 1 iframes - 1 tables - 1 cookies - 1 javaapplets - 1 javascript - 1 cssversion - 3 supportscss - 1 alpha - beta - win16 - win64 - backgroundsounds - cdf - vbscript - activexcontrols - isbanned - ismobiledevice - issyndicationreader - crawler - aol - aolversion - 0 Quote Link to comment https://forums.phpfreaks.com/topic/204087-get_browser-not-matching-http_user_agent/#findComment-1069021 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.