Get Google Pagerank


/ Published in: PHP
Save to your folder(s)

Get google pagerank of websites


Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.