Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

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?

Posted
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. :lol:

Posted

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.

Posted
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?

Posted
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 :lol:

 

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?

Posted (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 by TCH-Jim
Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...