Forum Moderators: martinibuster

Message Too Old, No Replies

Adsense script

         

SEOPTI

7:02 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is there a script which will send you an email when the mediapartners bot visited your site?

Jaunty Edward

7:06 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



I wrote that script myself for me in php, here it is.

$browser = $HTTP_USER_AGENT;

$terms = "bot"; //write mediapartner etc..

if (eregi($terms, $browser)) {
$body = "'$browser' - bot has come - '$terms'!";
mail(myemail@gmail.com','Bot Notification',$body);
}

Enjoy!

[edited by: Jaunty_Edward at 7:07 pm (utc) on Aug. 11, 2005]

wyweb

7:07 pm on Aug 11, 2005 (gmt 0)



I believe that would be serverside....

Jaunty Edward

7:09 pm on Aug 11, 2005 (gmt 0)

10+ Year Member



Hi,

PHP,ASP,JSP are server site scripting languages. I don't think this is possible by client side languages like javascript.

Bye

wyweb

7:10 pm on Aug 11, 2005 (gmt 0)



I stand corrected...

Rodney

7:25 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



should you edit the $bot field to make that script work?

Seems like it would work for all sorts of spiders?

SEOPTI

10:34 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks, but what language is this?

Rodney

10:38 pm on Aug 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



in php

I think it's a php script that you would just copy to a text file and name something.php and/or include it into your existing webpage.