New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

yangqi/htmldom

Simple Html Dom Parser for Laravel 4
781,035 89

Larablocks Analysis

yangqi/htmldom works with any PHP project: the latest release (v1.0.0, Sep 10, 2015) doesn't depend on Laravel.

Recommendation checks

Not advised

Not advised: marked abandoned on Packagist.

  • Marked abandoned on Packagist
  • No release in the last 12 months (last: Sep 10, 2015)
  • 12,099 downloads a month (at least 10,000)
  • 89 GitHub stars (needs 100)

State

Abandoned
  • Packagist marks this package abandoned.
  • Last stable release: Sep 10, 2015.
  • No releases in the last 12 months.
  • First released: Sep 10, 2015.
  • Monthly downloads: 12,099.
  • 12 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.

Install
composer require yangqi/htmldom
Latest Version:v1.0.0
PHP:>=5.3.0
License:MIT
Last Updated:Oct 6, 2019
Links: GitHub  ·  Packagist
Maintainer: yangqi

Htmldom

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

Installation

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

{
    "require": {
        "yangqi/htmldom": "1.0.*"
    }
}

Laravel 5 Setup (same as Laravel 4)

  1. Add the service provider to config/app.php.
'providers' => array(
    ...
	'Yangqi\Htmldom\HtmldomServiceProvider',
    ...
  1. Add alias to config/app.php.
'aliases' => array(	
    ...
	'Htmldom' => 'Yangqi\Htmldom\Htmldom',
    ...

Usage

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

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

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

See the detailed documentation http://simplehtmldom.sourceforge.net/manual.htm

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Version Released PHP License
v1.0.0 >=5.3.0 MIT