growthexponent/laravel-html-dom-parser

Laravel wrapper for the PHP HTML DOM Parser package.
261 4
Install
composer require growthexponent/laravel-html-dom-parser
Latest Version:v1.0.6
PHP:>=5.5.9
Laravel:5
License:MIT
Last Updated:Sep 25, 2015
Links: GitHub  ·  Packagist
Maintainer: grexp

Laravel wrapper for the PHP HTML DOM Parser package.

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);
    }
}

Related Packages

eelcol/laravel-html-dom

Laravel HTML Dom implementation

5,955 0
kovah/laravel-html-meta

A Laravel package to parse meta information from an URL.

70,512 8
richarddobron/bigpipe

BigPipe: Pipelining web pages for high performance built in PHP.

22,617 11
rvish/emoji

An Emoji encoder and decoder with browser for Laravel 5 (unified to HTML)

31 3
spatie/laravel-html

A fluent html builder

9,073,540 827

Version History

Version Released PHP Laravel License
v1.0.6 >=5.5.9 5.1.* MIT
v1.0.5 >=5.5.9 5.1.* MIT
v1.0.4 >=5.5.9 5.1.* MIT
v1.0.3 >=5.5.9 5.1.* MIT
v1.0.2 >=5.5.9 5.1.* MIT