El siguiente código nos ayuda obtener información del número de páginas indexadas en Google de cierto sitio web, mediante PHP y cURL.

funciones.php contiene dos funciones: una para obtener información del contenido de la página web y la otra para extraer el contenido entre 2 cadenas (delimitadores). 

<?php
function LoadCURLPage($url, $agent = 'Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)
Gecko/20030624 Netscape/7.1 (ax)',
$cookie = '', $referer = '', $post_fields = '', $return_transfer = 1,
$follow_location = 1, $ssl = '', $curlopt_header = 0){
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, $url);

if($ssl)
{
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
}

curl_setopt ($ch, CURLOPT_HEADER, $curlopt_header);

if($agent)
{
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
}

if($post_fields)
{
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
}

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);

if($referer)
{
curl_setopt($ch, CURLOPT_REFERER, $referer);
}

if($cookie)
{
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
}

$result = curl_exec ($ch);

curl_close ($ch);

return $result;
}

function extract_unit($string, $start, $end){
$pos = stripos($string, $start);

$str = substr($string, $pos);

$str_two = substr($str, strlen($start));

$second_pos = stripos($str_two, $end);

$str_three = substr($str_two, 0, $second_pos);

$unit = trim($str_three); // remove whitespaces

return $unit;
}
?>

Ahora en el archivo index.php llamamos a funciones.php y hacemos uso de las funciones definidas anteriormente, además de especificar el sitio a escanear, veamos:

<?php
error_reporting (E_ALL ^ E_NOTICE);

include 'funciones.php';

// Sitio web a chequear
$site = 'www.microsoft.com';

// Conectar a la url usando cURL
$url = 'http://www.google.com/search?hl=en&q=site%3A'.$site.'&btnG=Search';

$data = LoadCURLPage($url);

// Extraer la información entre Cadena 1 y Cadena 2

$string_one = '</b> of about <b>';
$string_two = '</b>';

$info = extract_unit($data, $string_one, $string_two);

echo 'Google ha indexado '.$info.' paginas de '.$site.'.';
?>

El resultado será:

Google ha indexado 1,420,000 paginas de www.microsoft.com.

Vía Creating a simple web data (spider) extractor