Free Sitemap Scraper for BHW

slipchamber

Registered Member
Joined
Jun 25, 2010
Messages
93
Reaction score
16
a little tool I made that people were using and I didn't even know, until I took it down and they complained..

<?php

echo "Example Input: http://www.stockblogs.com/sitemap.xml<br><br>";


$search2 = $_POST['search'];


if(isset($_POST['search'])){
$search = urlencode($search2);
$string = file_get_contents("$search2");
preg_match_all('~<loc>(.*)</loc>~isU', $string, $goog);
$count = "0";
do{
$googcount = $goog[1][$count];
echo $googcount."<br>";
$count = $count + 1;}
while ($googcount != '');


echo "<br>";
}
echo "A simple tool to find all links on an XML or AXD sitemap";
echo "<br>";
echo "<br>";
echo "<form action=\"magicscrape.php\" target=\"_self\" method=\"post\">";
echo "<input type=\"text\" id =\"search\" name=\"search\" type=\"text\" size=\"25\" maxlength=\"50\" >"."</input>";
echo "<script>"."document.getElementById('search').focus()"."</script>";
echo "<br>";
echo "<br>";
echo "<input type=\"submit\" value=\"Find Links\">";
echo "</form>"

?>
 
You should point that file need to be named magicscrape.php in order this script to work
 
It would be cool to have a script that scrapes all the urls of a site which doesnt have any sitemap.xml (there are tons)

anyway thanks for sharing
 
Back
Top