Download the PHP package vipnytt/useragentparser without Composer
On this page you can find all versions of the php package vipnytt/useragentparser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vipnytt/useragentparser
More information about vipnytt/useragentparser
Files in vipnytt/useragentparser
Package useragentparser
Short Description User-Agent parser for robot rule sets
License MIT
Homepage https://github.com/VIPnytt/UserAgentParser
Informations about the package useragentparser
User-Agent parser for robot rule sets
Parser and group determiner optimized for robots.txt
, X-Robots-tag
and Robots-meta-tag
usage cases.
Requirements:
- PHP 5.5+, 7.0+ or 8.0+
Installation
The library is available for install via Composer. Just add this to your composer.json
file:
Then run php composer update
.
Features
- Stripping of the version tag.
- List any rule groups the User-Agent belongs to.
- Determine the correct group of records by finding the group with the most specific User-agent that still matches.
When to use it?
- When parsing
robots.txt
rule sets, for robots online. - When parsing the
X-Robots-Tag
HTTP header. - When parsing
Robots meta tags
in HTML / XHTML documents.
Note: Full User-agent strings, like them sent by eg. web-browsers, is not compatible, this is by design.
Supported User-agent string formats are UserAgentName/version
with or without the version tag. Eg. MyWebCrawler/2.0
or just MyWebCrawler
.
Getting Started
Strip the version tag.
List different groups the User-agent belongs to
Determine the correct group
Determine the correct group of records by finding the group with the most specific User-agent that still matches your rule sets.