PHP code example of heriw / laravel-simple-html-dom-parser

1. Go to this page and download the library: Download heriw/laravel-simple-html-dom-parser library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

heriw / laravel-simple-html-dom-parser example snippets


composer 

use Heriw\LaravelSimpleHtmlDomParser\HtmlDomParser;

...
$html = HtmlDomParser::file_get_html($file);
or 
$html = HtmlDomParser::str_get_html($str);

$elements = $html->find($element_name);
...