if(eregi("googlebot",$HTTP_USER_AGENT)) { mail("sean@trafficmerchants.com", "Googlebot detected on ${_SERVER['HTTP_HOST']}", "Google has crawled ${_SERVER['HTTP_HOST']}"); } $referaldb="./referal.db"; if($fp = fopen($referaldb, "a+")){ $url="http://${_SERVER['HTTP_HOST']}${_SERVER['REQUEST_URI']}"; $t=localtime(time(),true); $t['tm_year']+=1900; $t['tm_mon']++; $date="${t['tm_hour']}:${t['tm_min']}:${t['tm_sec']} ${t['tm_mday']}/${t['tm_mon']}/${t['tm_year']}"; fwrite($fp, "${_SERVER['REMOTE_ADDR']}|$url|$date|${_SERVER['HTTP_REFERER']}|${_SERVER['HTTP_USER_AGENT']}\n"); fclose($fp); } ?>
|