<?php
$agent = $_SERVER['HTTP_USER_AGENT'];
if(preg_match("/google/i","$agent")){
$date = date("d.m.Y H:i:s");
$logfile = "googlebot.html";
if(!file_exists("$logfile")) touch("$logfile");
$content = file_get_contents("$logfile");
file_put_conents("$logfile","$content<br>$date");
}
?>