PHP Simple HTML DOM Parser code example
Example 1: php simple html dom get contact info
<?php
include('simple_html_dom.php');
$html = file_get_html("http://nimishprabhu.com");
$html = file_get_html("index.html");
$html = file_get_html("/home/admin/nimishprabhu.com/testfiles/index.html");
$html = str_get_html("<html><head><title>Cool HTML Parser</title></head><body><h2>PHP Simple HTML DOM Parser</h2><p>PHP Simple HTML DOM Parser is the best HTML DOM parser in any programming language.</p></body></html>");
$data = file_get_contents("http://nimishprabhu.com");
$data = str_replace("Nimish", "NIMISH", $data);
$html = str_get_html($data);
?>
Example 2: How to install php-simple-html-dom-parser
composer require sunra/php-simple-html-dom-parser