This function will helpful for SEO persons, because they are aware of SEO index term but as a developer we also have knowledge of crawling of websites.
In this php script we will use simple CURL request and get data from google server.
In this php script we will use simple CURL request and get data from google server.
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); return intval($data->responseData->cursor->estimatedResultCount); } echo getGoogleCount('Domain.com');
No comments:
Post a Comment