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.

Maintainers

Package info

github.com/jeffmilanes/php-html-dom-parser

Homepage

pkg:composer/jeffmilanes/php-html-dom-parser

Statistics

Installs: 3

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2020-01-26 15:16 UTC

This package is auto-updated.

Last update: 2026-02-27 05:24:29 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);
...