sb15/php-simple-html-dom-parser

此包已被废弃且不再维护。作者建议使用 simplehtmldom/simplehtmldom 包代替。

Composer 适配:PHP5+ 编写的 HTML DOM 解析器,让您能够非常容易地操作 HTML!需要 PHP 5+。支持无效 HTML。使用选择器在 HTML 页面上查找标签,就像 jQuery 一样。一行代码提取 HTML 内容。

安装: 200

依赖者: 0

建议者: 0

安全: 0

星星: 0

关注者: 1

分支: 262

语言:HTML

v1.5.0 2015-07-17 18:38 UTC

This package is auto-updated.

Last update: 2020-01-15 14:44:44 UTC


README

版本 1.5

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/

安装

composer.phar

"require": {
    "sunra/php-simple-html-dom-parser": "v1.5.0"
    }

用法

use Sunra\PhpSimple\HtmlDomParser;

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

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