Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browscap returns 'Default Browser' #47

Open
ammont opened this issue Nov 18, 2013 · 12 comments
Open

browscap returns 'Default Browser' #47

ammont opened this issue Nov 18, 2013 · 12 comments

Comments

@ammont
Copy link

ammont commented Nov 18, 2013

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

@quentin389
Copy link
Collaborator

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

@ammont
Copy link
Author

ammont commented Nov 21, 2013

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

Firefox 25.0.1 on OSX

@quentin389
Copy link
Collaborator

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?

@ammont
Copy link
Author

ammont commented Nov 21, 2013

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

@xzag
Copy link

xzag commented Dec 3, 2013

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

@ntvsx193
Copy link

ntvsx193 commented Dec 8, 2013

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

@wz520
Copy link

wz520 commented Dec 18, 2013

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

@AlexRegenbogen
Copy link

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...

@pjordaan
Copy link

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.

@quentin389
Copy link
Collaborator

That's already in the current version...

@pjordaan
Copy link

pjordaan commented Feb 4, 2014

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

@quentin389
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants