TCH-Thomas Posted August 26, 2004 Posted August 26, 2004 I have inserted the Google bot Detection script (I dont find the original post about it). I told it to email me at tompa (at) jikrantz.se but the emails keeps coming to cpanelusername (at) jikrantz.se. How come? Quote
TCH-Don Posted August 26, 2004 Posted August 26, 2004 This is the script I am using ><? if(eregi("googlebot",$HTTP_USER_AGENT)) { if ($QUERY_STRING != "") {$url = "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;} else {$url = "http://".$SERVER_NAME.$PHP_SELF;} $today = date("F j, Y, g:i a"); mail("MyEmailAddress", "Googlebot detected on http://$SERVER_NAME", "$today - Google crawled $url"); } ?> change the first item after mail( to the addy you want. Quote
TCH-Thomas Posted August 26, 2004 Author Posted August 26, 2004 That is same script as I use and all info is set correct. Quote
TCH-Don Posted August 26, 2004 Posted August 26, 2004 Is the addy a real account? if not it will goto the catchall (cpanel) account I created a rule in outlook Express to move the goggle addy into its own folder when I check e-mail but did not create an account for it. Does that help? Quote
TCH-Thomas Posted August 26, 2004 Author Posted August 26, 2004 Is the addy a real account?if not it will goto the catchall (cpanel) account 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. Quote
TCH-Thomas Posted August 27, 2004 Author Posted August 27, 2004 I dont know how and why because I havent changed anything, but today google finally understood which adress I want these emails sent too. Quote
Deverill Posted August 27, 2004 Posted August 27, 2004 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. I'm glad it's working for you now. Quote
kristian Posted August 28, 2004 Posted August 28, 2004 This is the script I am using ><? if(eregi("googlebot",$HTTP_USER_AGENT)) { if ($QUERY_STRING != "") {$url = "http://".$SERVER_NAME.$PHP_SELF.'?'.$QUERY_STRING;} else {$url = "http://".$SERVER_NAME.$PHP_SELF;} $today = date("F j, Y, g:i a"); mail("MyEmailAddress", "Googlebot detected on http://$SERVER_NAME", "$today - Google crawled $url"); } ?> change the first item after mail( to the addy you want. Hi TCH-Don, I've tried inserting the script into my index.php file and I got this error msg: Parse error: parse error, unexpected '{' in /home/domain/public_html/index.php on line 37 It can be inserted in the <head> area of the HTML document right? Quote
TCH-Thomas Posted August 28, 2004 Author Posted August 28, 2004 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. I'm glad it's working for you now. Good to know, thanks Jim 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? Quote
TCH-Don Posted August 29, 2004 Posted August 29, 2004 Hi kristian, the php snippet goes in the body. Mine is just before the Quote
TCH-Don Posted August 29, 2004 Posted August 29, 2004 Thomas, googelbot visits my site 2-3 time a day so that is nothing to worry about. I suspect not all visits are a deep crawl. Quote
Deverill Posted August 29, 2004 Posted August 29, 2004 (edited) 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. It could also be someone's browser or another spider calling itself googlebot too. You never know. Edited August 29, 2004 by TCH-Jim Quote
Deverill Posted August 29, 2004 Posted August 29, 2004 Parse error: parse error, unexpected '{' in /home/domain/public_html/index.php on line 37 It can be inserted in the <head> area of the HTML document right? Which line is line 37 in your file? 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.