This site is for sale,
Learn More
The Googlebot Came To Call
Receive Email When Google Spiders Your Page
Originally Published: June 29, 2004
Editor's Note:
Your host must support PHP and your page file extension must be ".php" for this code to work.
Do you want to be automatically informed by email when Google's spider visits your web site?
A search engine spider is an automated software program that locates and collects data from web pages for inclusion in a search engine's database. The name of Google's spider is "Googlebot".
If you have a web site that allows you to use PHP code then your web pages can inform you when Google's spider has indexed them.
Ask your web space provider if you can use PHP code on your site. If you can, add the following piece of code at the very beginning of your web page HTML code, before the doctype declaration and before the <html> tag:
<?php
$email = "you@example.com";
if(eregi("googlebot",$_SERVER['HTTP_USER_AGENT']))
{
mail($email, "The Googlebot came to call",
"Google has visited: ".$_SERVER['REQUEST_URI']);
}
?>
|
(Source: V. M. Marshalls
weblog)
This little piece of PHP code recognizes Googlebot if it visits the web page, and it informs you by email when Googlebot has been there.
Of course, you have to replace "you@example.com" with your own email address. The web page must end with .php and you must be allowed to use PHP on your web site.
Note that a visit of the Googlebot doesn't mean that Google will index your web site. Google will decide later if the visited page is suitable for its database.
You can also use this code with other search engine spiders. To be informed by email when Yahoo's spider visits your web pages, replace "googlebot" in the example with "yahoo! Slurp":
<?php
$email = "you@example.com";
if(eregi("yahoo! Slurp",$_SERVER['HTTP_USER_AGENT']))
{
mail($email, "The Yahoo bot came to call",
"Yahoo has visited: ".$_SERVER['REQUEST_URI']);
}
?>
|
You can also do this with other search engine spiders. You can get a list of search engine spider names
here.
To invite Google, Yahoo and other major search engines to visit your web site, you have to submit your web site to these search engines. You can either do this manually or you can use IBP to
submit your web site
to all important search engines.
IBP not only helps you to submit your web site to search engines, it also helps you to optimize your pages so that search engines rank your web pages higher.
Copyright by Axandra GmbH, publishers of SEOProfiler, a
complete SEO software solution.
Try SEOProfiler
for free.
All product names, copyrights and trademarks mentioned in this newsletter are owned by their
respective trademark and copyright holders.
Site Promotion Articles Indexes:
|