Having a complete list of your site is incredibly important in the current search landscape. You need not use a tool to get all the links of your site. Use the following PHP code to get all the links
<?php
$html = file_get_contents('http://www.kayalspot.blogspot.in');
$dom = new DOMDocument();
@$dom->loadHTML($html);
// grab all the links on the page
$xpath = new DOMXPath($dom);
$hrefs = $xpath->evaluate("/html/body//a");
for ($i = 0; $i < $hrefs->length; $i++) {
$href = $hrefs->item($i);
$url = $href->getAttribute('href');
echo $url.'<br />';
}
No comments:
Post a Comment