phpbrowscap icon indicating copy to clipboard operation
phpbrowscap copied to clipboard

browscap returns 'Default Browser'

Open ammont opened this issue 11 years ago • 12 comments

browscap_obj->getBrowser()->Browser returns 'Default Browser'

ammont avatar Nov 18 '13 13:11 ammont

Hi, I can't do anything with it unless you tell me what user agent is this for.

quentin389 avatar Nov 20 '13 21:11 quentin389

so when it does not recognize the browser will return 'Default Browser'?

Firefox 25.0.1 on OSX

ammont avatar Nov 21 '13 04:11 ammont

It's funny... cause that's not even documented in http://php.net/get_browser and yet I always assumed everybody knew that :)

Yes, 'Default Browser' means that the browser was not recognized.

Can you please paste the user agent string here?

quentin389 avatar Nov 21 '13 07:11 quentin389

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20100101 Firefox/25.0 FirePHP/0.7.4

ammont avatar Nov 21 '13 08:11 ammont

these were not recoginzed as well for me Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko

Firefox 25 and Explorer 11 on Windows 7

xzag avatar Dec 03 '13 10:12 xzag

I have too return 'Default Browser' Chrome 31: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

IE 11: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; rv:11.0) like Gecko

Opera 18: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 OPR/18.0.1284.49

ntvsx193 avatar Dec 08 '13 18:12 ntvsx193

Me too.

Firefox 26: Mozilla/5.0 (Windows NT 5.1; rv:26.0) Gecko/20100101 Firefox/26.0

And the object returned by getBrowser() contains almost nothing.

But on my Chrome 31 it works OK. Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36

wz520 avatar Dec 18 '13 13:12 wz520

Getting the same here, but after manually retrieving the actual latest browscap.ini (5021-rc1), I do get the correct results....

Looks like there is something amok with the retrieval of the 'latest' version of browscap.ini...

AlexRegenbogen avatar Dec 20 '13 16:12 AlexRegenbogen

I think the main issue is that http://tempdownloads.browserscap.com/ no longer contains the latest version, but http://browscap.org/ does.

so you can easily fix it: $browscap = new Browscap($cache_dir); $browscap->remoteIniUrl = "http://browscap.org/stream?q=Full_PHP_BrowsCapINI"; $browscap->remoteVerUrl = "http://browscap.org/version";

of course this should be done in the current source code.

pjordaan avatar Jan 31 '14 11:01 pjordaan

That's already in the current version...

quentin389 avatar Jan 31 '14 13:01 quentin389

I get my checkout with composer and the latest version I had did not link to the new url.

pjordaan avatar Feb 04 '14 08:02 pjordaan

Aha! Updated. Try now. Packagist doesn't update automatically for this project though.

quentin389 avatar Feb 04 '14 09:02 quentin389