growthexponent/laravel-html-dom-parser
最新稳定版本:v1.0.6
Composer 安装命令:
composer require growthexponent/laravel-html-dom-parser
包简介
Laravel wrapper for the PHP HTML DOM Parser package.
README 文档
README
Thin wrapper for https://github.com/paquettg/php-html-parser and provides the public function
$proxy = "120.195.203.43:80"; $proxy = explode(':', $proxy); loadFromUrlByProxy($url, $options = [], CurlInterface $curl = null, $proxy = null)
Installation
Requires
- PHP 5.4+
- Laravel 5.1+
Install via Composer by adding the following line to the require block of your composer.json file
"growthexponent/laravel-html-dom-parser": "1.0.*"
Then run php composer update
Add this line to the providers array in your php app/config/app.php file:
'LaravelHtmlDomParser\LaravelHtmlDomParserServiceProvider',
Sample Usage
<?php use LaravelHtmlDomParser\LaravelHtmlDomParser; class ...Controller extends Controller { /** * .... * * @return \Illuminate\Http\Response */ public function index() { $parser = new LaravelHtmlDomParser(); $proxy = "120.195.203.43:80"; $proxy = explode(':', $proxy); $html = $parser->loadFromUrlByProxy('http://www.growthexponent.com', [], null, $proxy); dd($html); } }
统计信息
- 总下载量: 261
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-09-24