{"id":20743870,"url":"https://github.com/reiniiriarios/useragent-parser","last_synced_at":"2026-04-24T10:03:35.559Z","repository":{"id":111408433,"uuid":"346540986","full_name":"reiniiriarios/useragent-parser","owner":"reiniiriarios","description":"User agent parser that returns vaguely useful browser and OS information. Primarily useful for icon generation and broad filtering, such as in log reports.","archived":false,"fork":false,"pushed_at":"2021-04-03T20:46:19.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-19T20:11:52.117Z","etag":null,"topics":["user-agent","user-agent-parser"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reiniiriarios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["reiniiriarios"],"ko_fi":"reinii"}},"created_at":"2021-03-11T01:24:12.000Z","updated_at":"2021-04-03T20:46:21.000Z","dependencies_parsed_at":"2023-05-30T03:00:34.307Z","dependency_job_id":null,"html_url":"https://github.com/reiniiriarios/useragent-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reiniiriarios/useragent-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fuseragent-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fuseragent-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fuseragent-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fuseragent-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reiniiriarios","download_url":"https://codeload.github.com/reiniiriarios/useragent-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Fuseragent-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32218290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T09:47:08.147Z","status":"ssl_error","status_checked_at":"2026-04-24T09:46:41.165Z","response_time":64,"last_error":"SSL_read: 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":["user-agent","user-agent-parser"],"created_at":"2024-11-17T07:13:21.037Z","updated_at":"2026-04-24T10:03:35.526Z","avatar_url":"https://github.com/reiniiriarios.png","language":"PHP","funding_links":["https://github.com/sponsors/reiniiriarios","https://ko-fi.com/reinii"],"categories":[],"sub_categories":[],"readme":"# useragent-parser\nUser agent parser that returns vaguely useful browser and OS information. Rather than aim for comprehensiveness, this aims only to return broad information on the most common devices, browsers, hardware, etc.\n\nMost useful when utilizing `get_icon($type)` or `get_all_icons()`.\n\n## Usage\n\n### Configuring\n\nSet `$ua-\u003eassets_uri` to path to icon pngs. (Default: `/assets/ua/`)\n\n### Result Types\n\n* Operating System `os`\n  * e.g. Windows, macOS\n* Browser `browser`\n  * e.g. Firefox, Safari, Firefox iOS\n* Hardware `hardware`\n  * e.g. Nintendo Switch, Apple iPad\n* Miscellaneous `misc`\n  * e.g. Slack, WhatsApp, Gmail, cURL, Python-urllib\n* Bot `bot`\n  * e.g. Googlebot, BingBot, Baidu Spider\n\n### Result Data\n\n* Name\n* Icon\n* Version\n* Brand (hardware only)\n* Model (hardware only)\n* Mobile (boolean, can be inaccurate)\n\n```php\n$user_agent      = new \\reiniiriarios\\Useragent\\Parser($user_agent_string);\n$user_agent_info = $user_agent-\u003eparse();\n$user_agent_os   = $user_agent-\u003eparse('os');\n$browser_icon    = $user_agent-\u003eget_icon('browser');\n/*\n$user_agent_info = [\n\t'os' =\u003e [\n\t\t'name'    =\u003e 'Windows',\n\t\t'icon'    =\u003e 'win10',\n\t\t'version' =\u003e '10'\n\t],\n\t'browser' =\u003e [\n\t\t'name'    =\u003e 'Firefox',\n\t\t'icon'    =\u003e 'firefox',\n\t\t'version' =\u003e '86.0'\n\t],\n\t'hardware' =\u003e false,\n\t'misc' =\u003e false,\n\t'bot' =\u003e false\n];\n$user_agent_os = [\n\t'name'    =\u003e 'Windows',\n\t'icon'    =\u003e 'win10',\n\t'version' =\u003e '10'\n];\n$browser_icon = '\u003cimg class=\"ua\" src=\"/assets/ua/firefox.png\" alt=\"Firefox 86.0\" data-toggle=\"tooltip\" data-placement=\"left\" title=\"Firefox 86.0\" /\u003e';\n*/\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Fuseragent-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freiniiriarios%2Fuseragent-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Fuseragent-parser/lists"}