Parser-PHP
Parser-PHP copied to clipboard
Browser sniffing gone too far — A useragent parser library for PHP
Hi, the following user agents doesn't get detected. Agents with "browser->using" object: Mozilla/5.0 (Linux; Android 8.0.0; SM-G950F Build/R16NW; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/69.0.3497.100 Mobile Safari/537.36 Mozilla/5.0 (Linux; Android...
* SEO Moz.com Roger Bot * SEO Majestic SEO Bot * HTTPUnit for Java
Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)
Hi, Have you considered a type like handheld? `$result->isType('handheld')` Handheld is an alternate serving media type for old phones. It's part of SEO mobile as indicated here: https://developers.google.com/search/mobile-sites/mobile-seo/other-devices Greetings!
Add support to detect Firefox release channels (stable, beta, nightly), like for Chrome. You would need to have a list of Firefox versions and their stability. You can get them...
Hi there dear Niels i think if something simple like this be added in the library can be good : `$header='$_SERVER['HTTP_USER_AGENT']'; $arch_regex = '/\b(x86_64|x86-64|Win64|WOW64|x64|ia64|amd64|ppc64|sparc64|IRIX64)\b/ix'; $this->bit=preg_match($arch_regex, $header) ? '64' : '32';`...
Fix for https://github.com/WhichBrowser/Parser-PHP/issues/96
http://useragent.mkf.solutions/?userAgent=Mozilla%2F5.0+%28iPhone%3B+CPU+iPhone+OS+10_0_1+like+Mac+OS+X%29+AppleWebKit%2F602.1.50+%28KHTML%2C+like+Gecko%29+Mobile%2F14A403 Referrer: https://github.com/jenssegers/agent/issues/65
This PR adds two methods which allow a more intuitive way to construct a parser, e.g.: ``` $parser = Parser::fromUserAgent($request->header('User-Agent')); $parser = Parser::fromHeaders($request->headers()); ``` As a side note: two redundant...
Fixes [PHP 8.2: Dynamic Properties are deprecated](https://php.watch/versions/8.2/dynamic-properties-deprecated)