stounhandj / htmldom-laravel
1.0.0
2021-08-30 12:47 UTC
Requires
- php: ^7.4 || ^8.0
This package is auto-updated.
Last update: 2024-11-07 00:22:49 UTC
README
### A package for Laravel 8, 7, 6, ^5.5 based on Simple HTML Dom ParserInstallation
$ composer require stounhandj/htmldom-laravel
Or
{ "require": { "stounhandj/htmldom-laravel": "^1.0.0" } }
Usage
- 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