PHP code example of eddieace / php-simple
1. Go to this page and download the library: Download eddieace/php-simple 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/ */
eddieace / php-simple example snippets
use Eddieace\PhpSimple\HtmlDomParser;
...
$dom = HtmlDomParser::str_get_html( $str );
or
$dom = HtmlDomParser::file_get_html( $file_name );
$elems = $dom->find($elem_name);
...
use Eddieace\PhpSimple\HtmlDomParser;
$html = HtmlDomParser::file_get_html("http://example.com/");
$results = $html->find('h1');
echo $results[0]->plaintext;
//output : Example Domain
json
composer