bupychuk / php-simple-html-dom-parser
Composer adaptation of: A HTML DOM parser written in PHP5+ let you manipulate HTML in a very easy way! Require PHP 5+. Supports invalid HTML. Find tags on an HTML page with selectors just like jQuery. Extract contents from HTML in a single line.
dev-master
2013-04-02 21:54 UTC
Requires
- php: >=5.3.2
This package is not auto-updated.
Last update: 2024-10-26 15:03:26 UTC
README
PHP Simple HTML DOM Parser - bundle for laravel
Parsing data from html or xml websites or strings
You can use jQuery selector syntax, more in documentation.
example:
$HDM = IoC::resolve('HtmlDomParser');
// Get from file
$dom = $HDM::file_get_html( 'http://www.google.com/finance/converter' );
// Get from string
$dom = $HDM::str_get_html( '<html><a href="http://laravel.com/"></html>' );
$href = $dom->find('a',0)->href; // = "http://laravel.com/"
php simple html dom Documentation