Receive an Email Every time the Googlebot comes to your site!

igotdreams igotdreams is offline Offline Jan 1st, 2005, 3:05 pm |
0
Would you like to know when the Google spider or any other spider comes by your site? Well now you can with this handy snippet. It will send you an email for everypage it visits.
Quick reply to this message  
ColdFusion Syntax
  1. <cfif CGI.Http_User_Agent CONTAINS "googlebot">
  2. <cfmail from="info@yoursite.com" to="you@yoursite.com" subject="The Googlebot came to call" server="smtp.mailserver.com">
  3. Google has visited #CGI.Script_Name#
  4. </cfmail>
  5. </cfif>
  6.  
  7. Put this in your application.cfm file in the root of your site. Then every page it visits you get an email, be sure to change the following code to yours;
  8.  
  9. info@yoursite.com = your email
  10. you@yoursite.com = your email
  11. smtp.mailserver.com = your mail server ex. mail.yourdomain.com
  12.  
  13. You can even change the script to alert you to other visits by other spiders, all you need is a list of other bots!
  14.  
  15. Try this list;
  16.  
  17. http://www.robotstxt.org/wc/active/html/

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC