function validateGoogleBotIP($ip) { $hostname = gethostbyaddr($ip); //"crawl-66-249-66-1.googlebot.com"
return preg_match('/\.google(bot)?\.com$/i', $hostname); }
if (strpos($_SERVER['HTTP_USER_AGENT'], 'Google') !== false) {
if (validateGoogleBotIP($_SERVER['REMOTE_ADDR'])) {
echo 'It is ACTUALLY google';
} else {
echo 'Someone\'s faking it!';
}
} else {
echo 'Nothing to do with Google';
}
antalya escort
alanya escort
konyaaltı escort
lara escort
aksu escort
kemer escort
muratpaşa escort
manavgat escort