Hello,
I do not understand why the simplehtmldom is failing.
This is the code:
<?php
ini_set('display_errors',1);
ini_set('display_startup_errors',1);
error_reporting(E_ALL);
//---
include_once('simplehtmldom_1_9_1/simple_html_dom.php');
//---
$url = "https://victoriousseo.com/sitemap_index.xml";
$html = new simple_html_dom();
$html->load_file($url);
//--
foreach($html->find("a") as $link)
{
echo $link->href."< br />";
}
?>
I got the simplehtmldom.php on the same directory as the file that has the above crawler code.
I get no error.
And, checkout the sitemap if you must as it does exist:
https://victoriousseo.com/sitemap_index.xml
And so, I do not understand why the code extracts nothing. I see a complete blank page.
Code from a tuturial:
http://timvanosch.blogspot.com/2013/02/php-tutorial-making-webcrawler.html