royalmar/simple-html-dom-parser
最新稳定版本:1.0.2
Composer 安装命令:
composer require royalmar/simple-html-dom-parser
包简介
modify SimpleHtmlDom for laravel
README 文档
README
Add library Simple html dom to Laravel More document: http://simplehtmldom.sourceforge.net/
##How to install
composer require royalmar/simple-html-dom-parser
##Laravel Setup Add the service provider to config/app.php:
'providers' => array(
...
'Royalmar\HtmlDomParser\HtmlDomParserServiceProvider',
//Laravel 5.1+
Royalmar\HtmlDomParser\HtmlDomParserServiceProvider::class,
...
Add alias to config/app.php:
'aliases' => array(
...
'HtmlDomParser' => 'Royalmar\HtmlDomParser\HtmlDomParser',
//Laravel 5.1+
'HtmlDomParser' => Royalmar\HtmlDomParser\HtmlDomParser::class,
...
##Usage
$parser = new \HtmlDomParser(); // get html dom from file $html = $parser->fileGetHtml('http://www.google.com'); // get html dom from string $html = $parser->strGetHtml('<p>Hello World</p>'); //OR // get html dom from file $html = \HtmlDomParser::fileGetHtml('http://www.google.com'); // get html dom from string $html = \HtmlDomParser::strGetHtml('<p>Hello World</p>');
统计信息
- 总下载量: 15.08k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2017-01-07