Code: Alles auswählen
<?
function isGoogleClick() {
if(stripos($_SERVER['HTTP_REFERER'], '.google.') !== false &&
preg_match('{^[a-z]+://[^.]*\.google\.}i’, $_SERVER[‘HTTP_REFERER’]))
return true;
if(stripos($_SERVER[‘HTTP_USER_AGENT’], ‘Googlebot’) !== false) {
$host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
if(stripos($host, 'googlebot') !== false) return true;
}
return false;
}
$google=isGoogleClick();
echo $google;
?>
wo liegt der Hund begraben?
John