stounhandj/htmldom-laravel

Installs: 675

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/stounhandj/htmldom-laravel

1.0.0 2021-08-30 12:47 UTC

This package is auto-updated.

Last update: 2025-10-07 02:22:18 UTC


README

Total Downloads Latest Stable Version License

### A package for Laravel 8, 7, 6, ^5.5 based on Simple HTML Dom Parser

Installation

$ composer require stounhandj/htmldom-laravel

Or

{
    "require": {
        "stounhandj/htmldom-laravel": "^1.0.0"
    }
}

Usage

  1. Use following:
use StounhandJ\HtmldomLaravel\Htmldom;

$html = new Htmldom('https://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