{"id":15027688,"url":"https://github.com/mimmi20/browser-detector","last_synced_at":"2026-04-21T08:08:48.315Z","repository":{"id":10521487,"uuid":"12711393","full_name":"mimmi20/browser-detector","owner":"mimmi20","description":"Library for PHP 8.4+ to detect Browsers and Devices","archived":false,"fork":false,"pushed_at":"2026-04-14T07:11:17.000Z","size":877939,"stargazers_count":48,"open_issues_count":0,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-04-14T09:35:05.853Z","etag":null,"topics":["detect","php","php85","ua-parser","user-agent","user-agent-parser"],"latest_commit_sha":null,"homepage":"https://github.com/mimmi20/BrowserDetector","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mimmi20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-09-09T20:06:56.000Z","updated_at":"2026-04-14T06:25:55.000Z","dependencies_parsed_at":"2025-12-06T05:03:53.124Z","dependency_job_id":"19a52d56-ff27-4752-bb96-d2b7c3bb89c5","html_url":"https://github.com/mimmi20/browser-detector","commit_stats":{"total_commits":5170,"total_committers":11,"mean_commits":470.0,"dds":"0.39883945841392654","last_synced_commit":"d3ed8ea487a6664bd38ff58a0f1155baa8634d37"},"previous_names":["mimmi20/browser-detector","mimmi20/browserdetector"],"tags_count":214,"template":false,"template_full_name":null,"purl":"pkg:github/mimmi20/browser-detector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fbrowser-detector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fbrowser-detector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fbrowser-detector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fbrowser-detector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mimmi20","download_url":"https://codeload.github.com/mimmi20/browser-detector/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mimmi20%2Fbrowser-detector/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32082811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["detect","php","php85","ua-parser","user-agent","user-agent-parser"],"created_at":"2024-09-24T20:06:54.006Z","updated_at":"2026-04-21T08:08:48.280Z","avatar_url":"https://github.com/mimmi20.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BrowserDetector\n\n[![Latest Stable Version](https://poser.pugx.org/mimmi20/browser-detector/v/stable?format=flat-square)](https://packagist.org/packages/mimmi20/browser-detector)\n[![Latest Unstable Version](https://poser.pugx.org/mimmi20/browser-detector/v/unstable?format=flat-square)](https://packagist.org/packages/mimmi20/browser-detector)\n[![License](https://poser.pugx.org/mimmi20/browser-detector/license?format=flat-square)](https://packagist.org/packages/mimmi20/browser-detector)\n\n## Code Status\n\n[![codecov](https://codecov.io/gh/mimmi20/BrowserDetector/branch/master/graph/badge.svg)](https://codecov.io/gh/mimmi20/BrowserDetector)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/e310a7977d6a375c9dd7/test_coverage)](https://codeclimate.com/github/mimmi20/browser-detector/test_coverage)\n[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/mimmi20/BrowserDetector.svg)](https://isitmaintained.com/project/mimmi20/BrowserDetector \"Average time to resolve an issue\")\n[![Percentage of issues still open](https://isitmaintained.com/badge/open/mimmi20/BrowserDetector.svg)](https://isitmaintained.com/project/mimmi20/BrowserDetector \"Percentage of issues still open\")\n[![Mutation testing badge](https://img.shields.io/endpoint?style=flat\u0026url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fmimmi20%2Fbrowser-detector%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/mimmi20/browser-detector/master)\n[![Maintainability](https://api.codeclimate.com/v1/badges/e310a7977d6a375c9dd7/maintainability)](https://codeclimate.com/github/mimmi20/browser-detector/maintainability)\n\n## Requirements\n\nThis library requires PHP 8.3+.\nAlso a PSR-3 compatible logger and a PSR-16 compatible cache are required.\n\n## Installation\n\nRun the command below to install via Composer\n\n```shell\ncomposer require mimmi20/browser-detector\n```\n\n## Usage\n\n```php\n$detectorFactory = new \\BrowserDetector\\DetectorFactory($cache, $logger);\n$detector        = $detectorFactory();\n\n// get the result\n$result = $detector-\u003egetBrowser($request);\n```\n\nThe request parameter may be a string, an array or a PSR-7 compatible message.\n\n## Usage Examples\n\n### Taking the user agent from the global $_SERVER variable\n\n```php\n$detectorFactory = new \\BrowserDetector\\DetectorFactory($cache, $logger);\n$detector        = $detectorFactory();\n\n$result = $detector-\u003egetBrowser($_SERVER);\n```\n\n### Using a sample useragent\n\n```php\n$detectorFactory = new \\BrowserDetector\\DetectorFactory($cache, $logger);\n$detector        = $detectorFactory();\n\n$result = $detector-\u003egetBrowser($the_user_agent);\n```\n\n## The result\n\nThe `getBrowser` function returns an array with this structure\n\n```php\n[\n    'headers' =\u003e [],\n    'device' =\u003e [\n        'architecture' =\u003e null,\n        'deviceName' =\u003e null,\n        'marketingName' =\u003e null,\n        'manufacturer' =\u003e 'unknown',\n        'brand' =\u003e 'unknown',\n        'dualOrientation' =\u003e null,\n        'simCount' =\u003e null,\n        'display' =\u003e [\n            'width' =\u003e null,\n            'height' =\u003e null,\n            'touch' =\u003e null,\n            'size' =\u003e null,\n        ],\n        'type' =\u003e 'unknown',\n        'ismobile' =\u003e null,\n        'istv' =\u003e null,\n        'bits' =\u003e null,\n    ],\n    'os' =\u003e [\n        'name' =\u003e null,\n        'marketingName' =\u003e null,\n        'version' =\u003e null,\n        'manufacturer' =\u003e 'unknown',\n    ],\n    'client' =\u003e [\n        'name' =\u003e null,\n        'modus' =\u003e null,\n        'version' =\u003e null,\n        'manufacturer' =\u003e 'unknown',\n        'type' =\u003e 'unknown',\n        'isbot' =\u003e null,\n    ],\n    'engine' =\u003e [\n        'name' =\u003e null,\n        'version' =\u003e null,\n        'manufacturer' =\u003e 'unknown',\n    ],\n]\n```\n\n## Issues and feature requests\n\nPlease report your issues and ask for new features on the GitHub Issue Tracker\nat \u003chttps://github.com/mimmi20/BrowserDetector/issues\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimmi20%2Fbrowser-detector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmimmi20%2Fbrowser-detector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmimmi20%2Fbrowser-detector/lists"}