Package Data | |
---|---|
Maintainer Username: | grexp |
Maintainer Contact: | jpascoe@growthexponent.com (jpascoe) |
Package Create Date: | 2015-09-24 |
Package Last Update: | 2015-09-25 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 03:15:44 |
Package Statistics | |
---|---|
Total Downloads: | 261 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 4 |
Total Watchers: | 1 |
Total Forks: | 2 |
Total Open Issues: | 1 |
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)
Requires
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',
<?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);
}
}