Hiya,
I do not understand why this crawler fails to echo found links on a page.
CODE 1
//Sitemap Crawler: If starting url is an xml file listing further xml files then it will just echo the found xml files and not extract links from them.
//Sitemap Protocol: https://www.sitemaps.org/protocol.html
include_once('simplehtmldom_1_9_1/simple_html_dom.php');
//Succeeds to echo found links on these 2 pages.
//$sitemap = 'https://www.rocktherankings.com/post-sitemap.xml';
//$sitemap = "https://www.rocktherankings.com/sitemap_index.xml"; //Has more xml files.
//Does not work. Shows blank page. Crawler fails to load the page or extract any found links on the page.
//$sitemap = "https://bytenota.com/sitemap.xml";
$html = new simple_html_dom();
$html->load_file($sitemap);
foreach($html->find("loc") as $link)
{
echo $link->innertext."<br>";
}
Issue is on this page:
//Does not work. Shows blank page. Crawler fails to load the page or extract any found links on the page.
//$sitemap = "https://bytenota.com/sitemap.xml";
What line of code do I need to add to fix this issue ?
Thanks!