<?php
if(substr(gethostbyaddr($_SERVER['REMOTE_ADDR']),-13) == "googlebot.com") {
  echo "ACCESS GRANTED";
} else {
  echo "ACCESS DENIED";
}
?>

