Your Open Source

 
Related Links

PHP

How to view cached google pages of your site using PHP

How to view cached google pages of your site using PHP :- You can get the google cached pages on your site by using the following PHP script. Here also available demo and download for the script. Please check it out here.

  • hits 1018
  • datetime Jul 10 08 01:11:40
  • author Sekar
  • rating

Get Pages on your site
The example given bellow,
<?php
echo getPageCount("phpkit.in");
function getPageCount($domain=''){
         $url = "http://www.google.com/search?hl=en&q=site:".$domain."&start=0&sa=N";
         $content =file_get_contents($url);
         $content = strip_tags($content);
         $content = str_replace(array("&nbsp;",'/','-','|','<','>','"',"'",":","(",")",","),"",$content);
         $find ='/^(([^"]*)of about ([^"]*) from '.$domain.'([^"]*))/i';
         preg_match($find, $content , $matches);
         return intval($matches[3]);
    }


?>
Rating : 12345

Comments

No Reply..

Quick Reply or Comments

Preview
Your Name:
Your Reply :
<> is a code tag
Enter the verification code: