enemis/php-simple-html-dom

A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Adapted to PHP 7+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.

1.5.2 2021-12-13 08:57 UTC

This package is auto-updated.

Last update: 2024-05-13 14:53:02 UTC


README

Version 1.5.2

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.

Fixed for php 7+

http://simplehtmldom.sourceforge.net/

Install

composer.phar

"require": {
    "enemis/php-simple-html-dom-parser": "1.5.2"
    }

Usage

use Enemis\PhpSimpleHtmlDom;

...
$dom = HtmlDomParser::str_get_html( $str );
or 
$dom = HtmlDomParser::file_get_html( $file_name );

$elems = $dom->find($elem_name);
...