PHPackages                             gavinggordon/sorcerer - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. gavinggordon/sorcerer

ActiveLibrary[HTTP &amp; Networking](/categories/http)

gavinggordon/sorcerer
=====================

An easy-to-use PHP class for scraping webpages' source code.

1.0.0(9y ago)118MITPHP

Since Jan 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/gavinggordon/sorcerer)[ Packagist](https://packagist.org/packages/gavinggordon/sorcerer)[ Docs](http://sorcerer.gavingordon.com)[ RSS](/packages/gavinggordon-sorcerer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Sorcerer
========

[](#sorcerer)

[![Packagist Version](https://camo.githubusercontent.com/7209a3671bf65fe31e4f41e7e21e4d7083d90d686aea578ad18c35c5ff700294/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676176696e67676f72646f6e2f736f7263657265722e737667)](https://packagist.com/gavinggordon/sorcerer)[![Github Release](https://camo.githubusercontent.com/7ed52793b6f36902f5226320db11b3f74872802429f2dab76264bca7fee5ba6c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f676176696e67676f72646f6e2f736f7263657265722e737667)](https://github.com/gavinggordon/sorcerer/master)[![Usage License](https://camo.githubusercontent.com/9cd40552edb11ceebe152c2a40af70998bd551fe7696a3cbdbb081bd6201b83b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f676176696e67676f72646f6e2f736f7263657265722e737667)](https://github.com/gavinggordon/sorcerer/blob/master/LICENSE.txt)

Description
-----------

[](#description)

An easy-to-use PHP class for scraping webpages' source code.

Usage
-----

[](#usage)

### Installation

[](#installation)

```
	$ composer require gavinggordon/sorcerer

```

### Examples

[](#examples)

#### Insantiation

[](#insantiation)

```
	include( 'vendor/autoload.php' );

	use GGG\Http\Data\Collection\Sorcerer as Sorcerer;

	$scraper = new Sorcerer();
```

#### Configuration

[](#configuration)

```
	$url = 'http://www.testurl.com/index.php';

	$regexes = [
		'/\]+?\>(.+)\/i',
		'/\]+?)[\s\/]*?\>/i'
	];

	$savefile = __DIR__ . './testurl-scrapedata.txt';

	$scraper->configure( $url, $regexes, $savefile );
```

### Run

[](#run)

If no filepath was set for "$savefile",...

```
	$data = $scraper->scrape();

	print_r( $data );
```

...the scraped data will be returned.

If a filepath was set for "$savefile",...

```
	$scraper->scrape();
```

...the scraped data will be saved to the file which you specified.

#### Issues

[](#issues)

If you have any issues at all, please post your findings in the issues page at .

#### License

[](#license)

This package utilizes the MIT License.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

Unknown

Total

1

Last Release

3402d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0265c11e917254193d286a481b3fa7794c4dd83ba29f71d239a19c1724956566?d=identicon)[gavinggordon](/maintainers/gavinggordon)

---

Top Contributors

[![gavinggordon](https://avatars.githubusercontent.com/u/7691513?v=4)](https://github.com/gavinggordon "gavinggordon (8 commits)")

---

Tags

httpphpinspectioncollectionwebsitewebpagescraperweb crawlingcrawlingscrapingweb-scraping web-crawlersource-codev1.0.0data collectinghtml codeinvestigation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gavinggordon-sorcerer/health.svg)

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

###  Alternatives

[duzun/hquery

An extremely fast web scraper that parses megabytes of HTML in a blink of an eye. No dependencies. PHP5+

363146.3k4](/packages/duzun-hquery)[hannesvdvreken/guzzle-debugbar

A Guzzle middleware that logs requests to debugbar's timeline

76410.4k1](/packages/hannesvdvreken-guzzle-debugbar)

PHPackages © 2026

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