jeffmilanes / php-html-dom-parser
Composer adaptation for: A simple PHP HTML DOM parser written in PHP5+, supports invalid HTML, and provides a very easy way to find, extract and modify the HTML elements of the dom. jquery like syntax allow sophisticated finding methods for locating the elements you care about.
dev-master
2020-01-26 15:16 UTC
Requires
- php: >=5.3.2
- ext-mbstring: *
This package is auto-updated.
Last update: 2025-06-27 03:50:58 UTC
README
Version 1.9.1 PHP 7.3 compatible
Adaptation for Composer and PSR-0 of:
A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.
http://simplehtmldom.sourceforge.net/
Install
composer require jeffmilanes/php-html-dom-parser
Usage
use jeffmilanes\PhpSimpleHtmlDomParser\HtmlDomParser; ... $dom = HtmlDomParser::str_get_html( $str ); or $dom = HtmlDomParser::file_get_html( $file_name ); $elems = $dom->find($elem_name); ...