I would like to know if it\'s possible to check if URL is indexed by Google using PHP.
Is this against their ToS?
Well, not explicitly. But you can check every page view using:
$agent = $_SERVER['HTTP_USER_AGENT']; if (strstr($agent, 'googlebot')){ // tell the database that google has crawled this page. }