Welcome to WebmasterWorld Guest from 184.108.40.206
Forum Moderators: open
How can I modify this so spiders that come to this url stay at my site and crawl it instead of following to?.com?
P.S the answer to this dosn't have to be php.. just work ;)
// Do a database lookup to see if the visitor's
// IP address is in your database of search engine
$query = "SELECT IP FROM SPIDERS WHERE IP = '".addslashes($REMOTE_ADDR;)."' LIMIT 1";
$result = mysql_query($query);
$spider = mysql_num_rows($result);
// no match is found, so the visitor is a human
// do the redirect
// A match was found in the database, which means
// the visitor is a search engine spider.
// Continue to display the rest of the page.
There are ready-made solutions available for this if you don't feel like coding your own.