PHPackages                             webimage/spider - 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. webimage/spider

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

webimage/spider
===============

Crawl website

0.0.6(1y ago)08MITPHP

Since Aug 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/WebImage/Spider)[ Packagist](https://packagist.org/packages/webimage/spider)[ RSS](/packages/webimage-spider/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependencies (6)Versions (8)Used By (0)

Spider
======

[](#spider)

A wrapper for Symfony/Browser-Kit that allows a URL to be downloaded, cached, and crawled.

Usage
-----

[](#usage)

```
use WebImage\Spider\UrlFetcher;
use Symfony\Component\HttpClient\HttpClient;
$logger = new \Monolog\Logger('spider');
$fetcher = new UrlFetcher('/path/to/cache', $logger, HttpClient::create());
$result = $fetcher->fetch(new Url('https://www.domain.com'));
```

It's a good idea to create an HttpClient with a user agent, for example

```
use Symfony\Component\HttpClient\HttpClient;
HttpClient::create([
    'headers' => [
        'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36'
    ]
]);
```

A crawler can be setup to recursively crawl URLs by setting up onFetch(FetchHandlerInterface) or onFetchCallback listeners.

```
use WebImage\Spider\FetchResponseEvent;
/** @var \WebImage\Spider\UrlFetcher $fetcher */
$fetcher->onFetchCallback(function(FetchResponseEvent $ev) {
    // Perform some logic here, then
    $ev->getTarget()->fetch(new Url('https://www.another.com/path'));
});
```

Add onFetch(...) and onFetchCallback(...) pushes the URL onto a stack that is recursively processed in the order that URLs are added.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

669d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/751d4f62a8a7b411acdf695ef5ea9e54c4d700381a0eccb8e88f5e6921848ef0?d=identicon)[WebImage](/maintainers/WebImage)

---

Top Contributors

[![WebImage](https://avatars.githubusercontent.com/u/3458276?v=4)](https://github.com/WebImage "WebImage (11 commits)")

### Embed Badge

![Health badge](/badges/webimage-spider/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.4M528](/packages/shopware-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

673139.5k6](/packages/spatie-laravel-export)[sproutcms/cms

Enterprise content management and framework

242.2k4](/packages/sproutcms-cms)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k58](/packages/open-dxp-opendxp)

PHPackages © 2026

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