I know it's late to answer this question, but I have a gr8 php function to do this ...
since I came across your question while searching for a solution
I want to share it with future search engines
php function:
function getGoogleCount($domain) { $content = file_get_contents('http://ajax.googleapis.com/ajax/services/' . 'search/web?v=1.0&filter=0&q=site:' . urlencode($domain)); $data = json_decode($content); $result = intval($data->responseData->cursor->estimatedResultCount); if ($result > 1000) { $result = floor($result / 1000) . 'K'; } return $result; }
Use (at the desired location):
<?php echo getGoogleCount('http://www.example.com'); ?>
Hope this helps. Sagive
Sagive SEO
source share