Google Bot Detection Script

windows

Guest
I have inserted the Google bot Detection script (I dont find the original post about it).<br />I told it to email me at tompa (at) jikrantz.se but the emails keeps coming to cpanelusername (at) jikrantz.se. How come?<!--content-->
This is the script I am using<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?<br />if(eregi("googlebot",$HTTP_USER_AGENT))<br />{<br />if ($QUERY_STRING != "")<br /> {$url = "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;}<br />else<br /> {$url = "http://".$SERVER_NAME.$PHP_SELF;}<br />$today = date("F j, Y, g:i a");<br />mail("MyEmailAddress", "Googlebot detected on http://$SERVER_NAME", "$today - Google crawled $url");<br />}<br />?><!--c2--></div><!--ec2--><br />change the first item after mail(<br />to the addy you want.<!--content-->
That is same script as I use and all info is set correct. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /><!--content-->
Is the addy a real account?<br />if not it will goto the catchall (cpanel) account<br /><br />I created a rule in outlook Express to move the goggle addy into its own folder when I check e-mail<br />but did not create an account for it.<br /><br />Does that help?<!--content-->
<!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->Is the addy a real account?<br />if not it will goto the catchall (cpanel) account<!--QuoteEnd--></div><!--QuoteEEnd--><br />Not sure I understand you correctly, but if I do, yes its a real account. Its the one I use for emailing you and you emailing me. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
I dont know how and why because I havent changed anything, but today google finally understood which adress I want these emails sent too. <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /><!--content-->
Wahoo <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /> <br /><br />Glad it is working <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
Just a tiny thing. The script is processed by the TCH server your site lives on and it sends the email, not Google. Just wanted to clear it up a bit.<br /><br />I'm glad it's working for you now.<!--content-->
<!--QuoteBegin-TCH-Don+Aug 26 2004, 11:43 AM--><div class='quotetop'>QUOTE(TCH-Don @ Aug 26 2004, 11:43 AM)</div><div class='quotemain'><!--QuoteEBegin-->This is the script I am using<br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1--><?<br />if(eregi("googlebot",$HTTP_USER_AGENT))<br />{<br />if ($QUERY_STRING != "")<br /> {$url = "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;}<br />else<br /> {$url = "http://".$SERVER_NAME.$PHP_SELF;}<br />$today = date("F j, Y, g:i a");<br />mail("MyEmailAddress", "Googlebot detected on http://$SERVER_NAME", "$today - Google crawled $url");<br />}<br />?><!--c2--></div><!--ec2--><br />change the first item after mail(<br />to the addy you want.<!--QuoteEnd--></div><!--QuoteEEnd--><br /> Hi TCH-Don,<br /><br />I've tried inserting the script into my index.php file and I got this error msg:<br /><br />Parse error: parse error, unexpected '{' in /home/domain/public_html/index.php on line 37<br /><br /><br />It can be inserted in the <head> area of the HTML document right?<!--content-->
<!--QuoteBegin-TCH-Jim+Aug 28 2004, 01:22 AM--><div class='quotetop'>QUOTE(TCH-Jim @ Aug 28 2004, 01:22 AM)</div><div class='quotemain'><!--QuoteEBegin-->Just a tiny thing. The script is processed by the TCH server your site lives on and it sends the email, not Google. Just wanted to clear it up a bit.<br /><br />I'm glad it's working for you now.<!--QuoteEnd--></div><!--QuoteEEnd--><br /> Good to know, thanks Jim <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> <br /><br />Then I now I have another problem, I have now received a message about google crawling my site 2 times in 2 days. Can it have been google that crawled it 2 times or has the server gone weird? I thought google crawled lets say 1 time a month or less?<!--content-->
Hi kristian,<br />the php snippet goes in the body.<br />Mine is just before the </body> tag.<!--content-->
Thomas, <br />googelbot visits my site 2-3 time a day<br />so that is nothing to worry about.<br />I suspect not all visits are a deep crawl.<!--content-->
Don's exactly right. Google may hit a home page or a well-connected page a couple times a day but it will only follow all of your links and see every page (what they call a "deep crawl") once a month or less usually.<br /><br />It could also be someone's browser or another spider calling itself googlebot too. You never know.<!--content-->
<!--QuoteBegin-kristian+Aug 28 2004, 02:53 AM--><div class='quotetop'>QUOTE(kristian @ Aug 28 2004, 02:53 AM)</div><div class='quotemain'><!--QuoteEBegin-->Parse error: parse error, unexpected '{' in /home/domain/public_html/index.php on line 37<br /><br /><br />It can be inserted in the <head> area of the HTML document right?<!--QuoteEnd--></div><!--QuoteEEnd--><br /> Which line is line 37 in your file?<br /><br />Yes, it can be inserted in the <head> section. It sounds like there may be a curly-brace where it should have a parenthesis or something like that.<!--content-->
 
Back
Top