2017 © Pedro Peláez
 

library htmldom

Simple Html Dom Parser for Laravel 4

image

yangqi/htmldom

Simple Html Dom Parser for Laravel 4

  • Wednesday, February 22, 2017
  • by yangqi
  • Repository
  • 4 Watchers
  • 82 Stars
  • 150,396 Installations
  • PHP
  • 13 Dependents
  • 2 Suggesters
  • 36 Forks
  • 11 Open issues
  • 2 Versions
  • 6 % Grown

The README.md

Htmldom

A Htmldom package for Laravel 4 and 5 based on Simple HTML Dom Parser, (*1)

Installation

Add the following line to the require section of composer.json:, (*2)

{
    "require": {
        "yangqi/htmldom": "1.0.*"
    }
}

Laravel 5 Setup (same as Laravel 4)

  1. Add the service provider to config/app.php.
'providers' => array(
    ...
    'Yangqi\Htmldom\HtmldomServiceProvider',
    ...
  1. Add alias to config/app.php.
'aliases' => array( 
    ...
    'Htmldom' => 'Yangqi\Htmldom\Htmldom',
    ...

Usage

  1. Use following:
$html = new \Htmldom('http://www.example.com');

// Find all images 
foreach($html->find('img') as $element) 
       echo $element->src . '<br>';

// Find all links 
foreach($html->find('a') as $element) 
       echo $element->href . '<br>';

See the detailed documentation http://simplehtmldom.sourceforge.net/manual.htm, (*3)

The Versions

22/02 2017

dev-master

9999999-dev

Simple Html Dom Parser for Laravel 4

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar yangqi

laravel html parser

10/09 2015

1.0.0

1.0.0.0

Simple Html Dom Parser for Laravel 4

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

by Avatar yangqi

laravel html parser