PHPackages                             kasperstuck/htmldom - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. kasperstuck/htmldom

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

kasperstuck/htmldom
===================

Simple Html Dom Parser for Laravel 4

v1.0.0(10y ago)024MITPHPPHP &gt;=5.3.0

Since Sep 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/KasperStuck/Htmldom)[ Packagist](https://packagist.org/packages/kasperstuck/htmldom)[ RSS](/packages/kasperstuck-htmldom/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Htmldom
=======

[](#htmldom)

A Htmldom package for Laravel 4 and 5 based on Simple HTML Dom Parser

Installation
------------

[](#installation)

Add the following line to the `require` section of `composer.json`:

```
{
    "require": {
        "yangqi/htmldom": "dev-master"
    }
}
```

Laravel 5 Setup (same as Laravel 4)
-----------------------------------

[](#laravel-5-setup-same-as-laravel-4)

1. Add the service provider to `config/app.php`.

```
'providers' => array(
    ...
	'Yangqi\Htmldom\HtmldomServiceProvider',
    ...
```

2. Add alias to `config/app.php`.

```
'aliases' => array(
    ...
	'Htmldom' => 'Yangqi\Htmldom\Htmldom',
    ...
```

Usage
-----

[](#usage)

1. Use following:

```
$html = new \Htmldom('http://www.example.com');

// Find all images
foreach($html->find('img') as $element)
       echo $element->src . '';

// Find all links
foreach($html->find('a') as $element)
       echo $element->href . '';
```

See the detailed documentation

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

3946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/79624f7e5fc7fc4209b4a3bfa5187a0a966b5a105ddd8d57d89eb257de0d852c?d=identicon)[KasperStuck](/maintainers/KasperStuck)

---

Top Contributors

[![KasperStuck](https://avatars.githubusercontent.com/u/1186971?v=4)](https://github.com/KasperStuck "KasperStuck (4 commits)")[![blinkums](https://avatars.githubusercontent.com/u/8732291?v=4)](https://github.com/blinkums "blinkums (2 commits)")[![yangqi](https://avatars.githubusercontent.com/u/211604?v=4)](https://github.com/yangqi "yangqi (2 commits)")[![alep84](https://avatars.githubusercontent.com/u/7993555?v=4)](https://github.com/alep84 "alep84 (1 commits)")[![clemblanco](https://avatars.githubusercontent.com/u/668419?v=4)](https://github.com/clemblanco "clemblanco (1 commits)")[![lahaxearnaud](https://avatars.githubusercontent.com/u/1364221?v=4)](https://github.com/lahaxearnaud "lahaxearnaud (1 commits)")

---

Tags

laravelHTML Parser

### Embed Badge

![Health badge](/badges/kasperstuck-htmldom/health.svg)

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

###  Alternatives

[json-mapper/laravel-package

The JsonMapper package for Laravel

25188.9k3](/packages/json-mapper-laravel-package)

PHPackages © 2026

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