PHPackages                             m6web/roboxt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. m6web/roboxt

AbandonedArchivedLibrary[Parsing &amp; Serialization](/categories/parsing)

m6web/roboxt
============

lib used for parsing a robots.txt file

1.1.0(11y ago)175756[4 issues](https://github.com/M6Web/roboxt/issues)[1 PRs](https://github.com/M6Web/roboxt/pulls)MITPHP

Since Jul 22Pushed 6y ago3 watchersCompare

[ Source](https://github.com/M6Web/roboxt)[ Packagist](https://packagist.org/packages/m6web/roboxt)[ RSS](/packages/m6web-roboxt/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Roboxt
======

[](#roboxt)

Roboxt is a PHP robots.txt file parser.

Usage
-----

[](#usage)

```
    # Create a Parser instance
    $parser = new \Roboxt\Parser();

    # Parse your robots.txt file
    $file = $parser->parse("http://www.google.com/robots.txt");

    # You can verify that an url is allowed by a specific user agent
    $tests = [
        ["/events", "*"],
        ["/search", "*"],
        ["/search", "badbot"],
    ];

    foreach ($tests as $test) {
        list($url, $agent) = $test;
        if ($file->isUrlAllowedByUserAgent($url, $agent)) {
            echo "\n ✔ $url is allowed by $agent";
        } else {
            echo "\n ✘ $url is not allowed by $agent";
        }
    }

    # You can also iterate over all user agents specified by the robots.txt file
    # And check the type of each directive
    foreach ($file->allUserAgents() as $userAgent) {
        echo "\n Agent {$userAgent->getName()}: \n";

        foreach ($userAgent->allDirectives() as $directive) {
            if ($directive->isDisallow()) {
                echo "  ✘ {$directive->getValue()} \n";
            } else if ($directive->isAllow()) {
                echo "  ✔ {$directive->getValue()} \n";
            }
        }
    }
```

Installation
------------

[](#installation)

The recommended way to install Roboxt is through [Composer](http://getcomposer.org/):

```
$> composer require m6web/roboxt

```

Running the Tests
-----------------

[](#running-the-tests)

Roboxt uses [PHPSpec](http://www.phpspec.net/) for the unit tests:

```
$> composer install --dev

$> ./vendor/bin/phpspec run
```

Credits
-------

[](#credits)

- M6Web
- [@benja-M-1](https://github.com/benja-M-1) and [@theodo](https://github.com/theodo)

License
-------

[](#license)

Roboxt is released under the MIT License.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 60% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~504 days

Total

2

Last Release

4221d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d124ab99e6e09d1195ab30ed99425796ed03882049ca990886b8c1b41aafc3e4?d=identicon)[benjam1](/maintainers/benjam1)

![](https://www.gravatar.com/avatar/4f041a1974dbc19c70e199fb278d9b9026409999444087c7efbd1cb249a49f3a?d=identicon)[omansour](/maintainers/omansour)

---

Top Contributors

[![benja-M-1](https://avatars.githubusercontent.com/u/212269?v=4)](https://github.com/benja-M-1 "benja-M-1 (6 commits)")[![omansour](https://avatars.githubusercontent.com/u/1131098?v=4)](https://github.com/omansour "omansour (2 commits)")[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (1 commits)")[![jshedde](https://avatars.githubusercontent.com/u/6703514?v=4)](https://github.com/jshedde "jshedde (1 commits)")

### Embed Badge

![Health badge](/badges/m6web-roboxt/health.svg)

```
[![Health](https://phpackages.com/badges/m6web-roboxt/health.svg)](https://phpackages.com/packages/m6web-roboxt)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19037.7M41](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9642.0k](/packages/sauladam-shipment-tracker)[moonshine/layouts-field

Field for repeating groups of fields for MoonShine

107.9k](/packages/moonshine-layouts-field)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

112.9k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
