miggsy007
10-25-2004, 12:38 PM
Hi all. I have the followng php in the index file for my website.
<?php
if(eregi("googlebot",$_SERVER['HTTP_USER_AGENT'])) {
$s = "";
foreach($_SERVER as $item => $value) {
$s .= "\n$item : $value";
}
$sdate = date("Y-m-d h:i:s");
$message = <<<MESSAGE
Visit date:$sdate
Information:
=================================
$s
=================================
MESSAGE;
if($google_alert) {
mail("miggsy007@hotmail.com", "googlebot alert", $message);
}
}
?>
It's supposed to alert me every time Googlebot checks my site. But it's been on for a few hours now and nothing's come through. I've heard that Googlebot should check even low traffic sites like mine at least a few times an hour.
Have I made a mistake with the PHP? Or is my site so unpopular that even Googlebot doesn't want to look at it? That's probably the most likely answer to be honest, but I thought I'd ask you kind folks to check for me. The site is the one in my signature if you want to see the code in situ.
Cheers,
Miggsy007
<?php
if(eregi("googlebot",$_SERVER['HTTP_USER_AGENT'])) {
$s = "";
foreach($_SERVER as $item => $value) {
$s .= "\n$item : $value";
}
$sdate = date("Y-m-d h:i:s");
$message = <<<MESSAGE
Visit date:$sdate
Information:
=================================
$s
=================================
MESSAGE;
if($google_alert) {
mail("miggsy007@hotmail.com", "googlebot alert", $message);
}
}
?>
It's supposed to alert me every time Googlebot checks my site. But it's been on for a few hours now and nothing's come through. I've heard that Googlebot should check even low traffic sites like mine at least a few times an hour.
Have I made a mistake with the PHP? Or is my site so unpopular that even Googlebot doesn't want to look at it? That's probably the most likely answer to be honest, but I thought I'd ask you kind folks to check for me. The site is the one in my signature if you want to see the code in situ.
Cheers,
Miggsy007