ColdFusion Tutorial

How getting email when Google is indexing my site?

In this example we have taken three spiders: googlebot, msnbot and lycos.
 
For a more complete list of spiders, see Database of Web Robots, Overview.
 
Insert this code on a page and you will get an email when the spider in the ListContainsNoCase is indexing that page. (or pages)

<cfset spider_name = "">

<cfif ListContainsNoCase(#cgi.http_user_agent#,"googlebot")>

<cfset spider_name = "googlebot">

<cfelseif ListContainsNoCase(#cgi.http_user_agent#,"msnbot")>

<cfset spider_name = "msnbot">

<cfelseif ListContainsNoCase(#cgi.http_user_agent#,"lycos")>

<cfset spider_name = "lycos">

</cfif>

<cfif Len(#spider_name#) gt 0>

<cfmail to="yourname@yourserver.com"

from="mailname@domain"

subject="Spider has crawled."

server="mail.domain.com"

type="Plain Text">

#spider_name# has crawled my site.

</cfmail>

</cfif>

 

ColdFusion Tutorial test

How getting email when Google is indexing my site?

No test is available or implemented for this ColdFusion Tutorial.

No User Comments.

No User Comments, be the first one to write your comments?

Add your comments

Your Name*:
Your Email:
Site URL:
Site Name:
Comemt Title*:
Your Comment*:
Key Phrase*:
8rJ
Your IP Address: 38.103.63.62
 

ScandicWeb is own by Scandic Systems LTD [UK] Company No. 5984000. All other trademarks and copyrights are the property of their respective holders.

[Home [Site Map [Privacy Statement [Site Feedback] [About ScandicWeb]


[ColdFusion [Flash [Search Engine Optimization [Graphics [Cascading Style Sheets (CSS) [JavaScript (JS) [Software]

Partner sites: ScandicSoft


Server time: 19. November 2008 Wednesday