Posted By

melisayves on 03/20/14


Tagged

page google rank


Versions (?)

Get Google Pagerank


 / Published in: PHP
 

URL: http://www.getsiteinfo.us/whois

Get google pagerank of websites

  1. public static function getGooglePagerank($domain) {
  2. $url = 'http://'.$domain;
  3. $query="http://toolbarqueries.google.com/tbr?client=navclient-auto&ch=".self::CheckHash(self::HashURL($url)). "&features=Rank&q=info:".$url."&num=100&filter=0";
  4. try{
  5. $data= file_get_contents($query);
  6. $pos = strpos($data, "Rank_");
  7. if($pos === false){} else{
  8. $pagerank = substr($data, $pos + 9);
  9. return $pagerank;
  10. }
  11. }catch(Exception $e)
  12. {
  13. return 0;
  14. }
  15.  
  16.  
  17. }

Report this snippet  

You need to login to post a comment.