PHPackages                             c2is/walker - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. c2is/walker

ActiveApplication[Utility &amp; Helpers](/categories/utility)

c2is/walker
===========

A basic wrapper around Goutte to crawl a website

028

Since Sep 25Compare

[ Source](https://github.com/c2is/Walker)[ Packagist](https://packagist.org/packages/c2is/walker)[ RSS](/packages/c2is-walker/feed)WikiDiscussions Synced yesterday

READMEChangelogDependenciesVersions (1)Used By (0)

Walker
======

[](#walker)

A simple wrapper around Goutte to crawl an entire website and get some stats about each page :

- status,
- pages referring to it,
- other informations cactchable if you use run() method to implement your needs.

Walker get all "a href" values to build its crawling, so there is an extensions' exclusion mechanism to ignore elements which are not relevants, for example images. See Parameters section below for more informations.

By default crawling is bound to subdomain given, but the second parameter of constructor allow you to define which other subdomains could be crawled. A regexp defines allowed subdomains, example which allow any subdomains :

```
$walker = new \Walker\Walker("http://www.somewebsite.fr", ".*");

```

Usage :
-------

[](#usage-)

In your composer.json add Walker into "require" block :

```
{
    "require": {
        "c2is/walker" : "dev-master"
    },
    "minimum-stability": "dev",
    "autoload": {
        "psr-0": {
            "": "src/"
        }
    },
}

```

Run composer update :

```
php ./composer.phar update

```

Instanciate the crawler, start the crawl and output stats after the process :

```
$walker = new \Walker\Walker("http://www.somewebsite.fr");
$walker -> start();
echo "".implode(" | ", $walker->storage->getColumns("stats"));
foreach($walker->storage->get("stats") as $stats){
    printf("\n%s | %s | %s",$stats["URL"], $stats["STATUS"], $stats["CALLED IN"]);
}
echo "";

```

If you want more informations or operations to be performed real-time during crawling you can pass an anonymous function to the run() method :

```
echo "".implode(" | ", $walker->storage->getColumns("stats"))." | LAST MODIF";
$walker -> run(function ($crawler, $client) {
    $lastMod = $client->getResponse()->getHeader("last-modified");
    $stats = $client->getStats();
    printf("\n%s | %s | %s| %s",$stats["URL"], $stats["STATUS"], $stats["CALLED IN"], $lastMod);
    flush();
});
echo "";

```

Parameters :
------------

[](#parameters-)

You can override configurations using setConfiguration() method, for example

```
$walker->setConfiguration("httpClientOptions",['curl.options' => array(
        CURLOPT_TIMEOUT      => 150
    )]
);
$walker->setConfiguration("excludedFileExt","`\.(jpg|jpeg|gif|png)$`i");

```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1763887?v=4)[A Cianfa](/maintainers/korby)[@korby](https://github.com/korby)

---

Top Contributors

[![korby](https://avatars.githubusercontent.com/u/1763887?v=4)](https://github.com/korby "korby (12 commits)")

### Embed Badge

![Health badge](/badges/c2is-walker/health.svg)

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

PHPackages © 2026

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