|
Change Language:
Get Google crawl date of a web site
Google crawl date in PHP
Google crawl date using PHP source code. Google bot crawls every web site after a specific period. You can check that date using Google's cache command in Google search engine. Here it is the example of Google cache.
http://64.233.183.104/search?q=cache%3Afree-computer-tips.info&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_enPK238__238
I created PHP function which gets Google bot crawl date and returns in a form of string. You can use these codes in your PHP applications. Code are under the marks due to setting of page
function google_crawl_date($url){ $output = file_get_contents('http://64.233.183.104/search?q=cache:'. urlencode($url).'&sourceid=navclient-ff&ie=UTF-8&rlz=1B3GGGL_enPK238__238'); $match_expression = '/appeared on (.*). The <a href/Us'; preg_match($match_expression,$output,$matches); if ($matches[1]=="") return "No Date found"; else return $matches[1]; }
Usage of function above
<?php echo google_craw_date("http://free-computer-tips.info"); ?>
See Also or Related Articles:
|