Page is a not externally linkable
argiope - 2:57 am on Apr 13, 2007 (gmt 0)
site scrapers can really take advantage of it too... I've made a small php code that you can check who is requesting your sitemap. You can detect if the requester is a known searchengine or not. <snip> <?php //search for the reverse dns matches the white list if (!botIsAllowed($_SERVER['REMOTE_ADDR'])){ [edited by: engine at 7:52 am (utc) on April 13, 2007]
yesterday I've blogged about this too.
however,
function botIsAllowed($ip){
//get the reverse dns of the ip.
$host = strtolower(gethostbyaddr($ip));
$botDomains = array('.inktomisearch.com',
'.googlebot.com',
'.ask.com',
);
foreach($botDomains as $bot){
if (strpos(strrev($host),strrev($bot))===0){
$qip= gethostbyname($host);
return ($qip==$ip);
}
}
return false;
}
echo "Banned!";
exit;
}
?>
[edit reason] No urls, thanks. See TOS [webmasterworld.com] [/edit]