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 2mo 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 19% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

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

623d 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.6k](/packages/craftcms-cms)[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M79](/packages/google-cloud-core)[ashallendesign/favicon-fetcher

A Laravel package for fetching website's favicons.

190272.4k3](/packages/ashallendesign-favicon-fetcher)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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