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

ActiveLibrary

simplon/spider
==============

Retrieve a website's essential information

0.1.13(10y ago)94073MITPHPPHP &gt;=5.4

Since Sep 1Pushed 5y ago2 watchersCompare

[ Source](https://github.com/fightbulc/simplon_spider)[ Packagist](https://packagist.org/packages/simplon/spider)[ Docs](https://github.com/fightbulc/simplon_spider)[ RSS](/packages/simplon-spider/feed)WikiDiscussions master Synced 1mo ago

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

```
								     /      \
							  	  \  \  ,,  /  /
								   '-.`\()/`.-'
								  .--_'(  )'_--.
							     / /` /`""`\ `\ \
			 					  |  |  ><  |  |
								  \  \      /  /
 									  '.__.'

								  Simplon/Spider
```

---

[![Build Status](https://camo.githubusercontent.com/4aceaeb941096345f083ca0dfa08f2af1635906f48b8cc64d5398e6d5588d897/68747470733a2f2f7472617669732d63692e6f72672f666967687462756c632f73696d706c6f6e5f7370696465722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/fightbulc/simplon_spider)

Intro
=====

[](#intro)

### What is simplon/spider?

[](#what-is-simplonspider)

Spider parses a given `html document` and aggregates all essential data:

- title
- description
- keywords
- all h1 contents
- open-graph tags
- twitter tags
- all images

It basically gives you sort of the same response as Facebook's scraper. However, Facebook's scraper does not give you all essential data.

#### Facebook scraper response:

[](#facebook-scraper-response)

```
{
   "og_object":{
      "id":"379786107965",
      "description":"Find the latest breaking news and information on the top stories, weather, business, entertainment, politics, and more. For in-depth coverage, CNN provides special reports, video, audio, photo galleries, and interactive guides",
      "title":"Breaking News, U.S., World, Weather, Entertainment & Video News - CNN.com",
      "type":"website",
      "updated_time":"2015-09-01T13:15:53+0000",
      "url":"http:\/\/www.cnn.com\/"
   },
   "share":{
      "comment_count":0,
      "share_count":1340555
   },
   "id":"http:\/\/cnn.com"
}
```

#### Spider response:

[](#spider-response)

```
{
   "title":"Breaking News, U.S., World, Weather, Entertainment & Video News - CNN.com",
   "description":"Find the latest breaking news and information on the top stories, weather, business, entertainment, politics, and more. For in-depth coverage, CNN provides special reports, video, audio, photo galleries, and interactive guides",
   "keywords":"breaking news, news online, U.S. news, world news, developing story, news video, CNN news, weather, business, money, politics, law, technology, entertainment, education, travel, health, special reports, autos, CNN TV",
   "url": "http:\/\/www.cnn.com\/",
   "images":[
      "http://i2.cdn.turner.com/cnnnext/dam/assets/150901143136-budapest-migrant-protest-fists-large-169.jpg",
      "http://i2.cdn.turner.com/cnnnext/dam/assets/110902115913-gates-of-auschwitz-large-169.jpg"
   ],
   "openGraph":{
      "pubdate":"2014-02-24T14:45:54Z",
      "url":"http://www.cnn.com",
      "title":"Breaking News, U.S., World, Weather, Entertainment &amp; Video News - CNN.com",
      "description":"Find the latest breaking news and information on the top stories, weather, business, entertainment, politics, and more. For in-depth coverage, CNN provides special reports, video, audio, photo galleries, and interactive guides",
      "site_name":"CNN",
      "type":"website"
   },
   "twitter":{
      "card":"summary_large_image"
   }
}
```

### Any dependencies?

[](#any-dependencies)

- PHP 5.4
- CURL

---

Install
=======

[](#install)

Easy install via composer. Still no idea what composer is? Inform yourself [here](http://getcomposer.org).

```
{
    "require": {
        "simplon/spider": "*"
    }
}
```

---

Examples
========

[](#examples)

The following examples are straight forward and should not require any additional explaintation.

### Parse by fetching the page first

[](#parse-by-fetching-the-page-first)

```
use Simplon\Spider\Spider;

// fetch and parse
$data = Spider::fetchParse('http://cnn.com');

echo json_encode($data); // json encode result
```

### Parse by existing html

[](#parse-by-existing-html)

```
use Simplon\Spider\Spider;

// page html
$html = '...';

// fetch and parse
$data = Spider::parse($html, 'http://cnn.com'); // URL is needed to rebuild absolute image paths

echo json_encode($data); // json encode result
```

### Result in both cases

[](#result-in-both-cases)

```
{
   "title":"Breaking News, U.S., World, Weather, Entertainment & Video News - CNN.com",
   "description":"Find the latest breaking news and information on the top stories, weather, business, entertainment, politics, and more. For in-depth coverage, CNN provides special reports, video, audio, photo galleries, and interactive guides",
   "keywords":"breaking news, news online, U.S. news, world news, developing story, news video, CNN news, weather, business, money, politics, law, technology, entertainment, education, travel, health, special reports, autos, CNN TV",
   "url": "http:\/\/www.cnn.com\/",
   "images":[
      "http://i2.cdn.turner.com/cnnnext/dam/assets/150901143136-budapest-migrant-protest-fists-large-169.jpg",
      "http://i2.cdn.turner.com/cnnnext/dam/assets/110902115913-gates-of-auschwitz-large-169.jpg"
   ],
   "openGraph":{
      "pubdate":"2014-02-24T14:45:54Z",
      "url":"http://www.cnn.com",
      "title":"Breaking News, U.S., World, Weather, Entertainment &amp; Video News - CNN.com",
      "description":"Find the latest breaking news and information on the top stories, weather, business, entertainment, politics, and more. For in-depth coverage, CNN provides special reports, video, audio, photo galleries, and interactive guides",
      "site_name":"CNN",
      "type":"website"
   },
   "twitter":{
      "card":"summary_large_image"
   }
}
```

---

License
=======

[](#license)

simplon/spider is freely distributable under the terms of the MIT license.

Copyright (c) 2015 Tino Ehrich ()

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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 ~5 days

Recently: every ~17 days

Total

14

Last Release

3841d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/451061?v=4)[Tino Ehrich](/maintainers/fightbulc)[@fightbulc](https://github.com/fightbulc)

---

Tags

pagewebsitespidermetainformation

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[facade/ignition

A beautiful error page for Laravel applications.

2.1k102.2M333](/packages/facade-ignition)[spatie/crawler

Crawl all internal links found on a website

2.8k16.3M52](/packages/spatie-crawler)[spatie/laravel-ignition

A beautiful error page for Laravel applications.

573146.7M471](/packages/spatie-laravel-ignition)[spatie/ignition

A beautiful error page for PHP applications.

511147.6M69](/packages/spatie-ignition)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[pagerfanta/pagerfanta

Pagination for PHP

42550.0M245](/packages/pagerfanta-pagerfanta)

PHPackages © 2026

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