Return to Snippet

Revision: 66137
at March 20, 2014 03:38 by melisayves


Initial Code
public static function getGooglePagerank($domain) {
		$url = 'http://'.$domain;
		$query="http://toolbarqueries.google.com/tbr?client=navclient-auto&ch=".self::CheckHash(self::HashURL($url)). "&features=Rank&q=info:".$url."&num=100&filter=0";
		try{
			$data= file_get_contents($query);
			$pos = strpos($data, "Rank_");
			if($pos === false){} else{
				$pagerank = substr($data, $pos + 9);
				return $pagerank;
			}
		}catch(Exception $e)
		{
			return 0;	
		}
		
		
	}

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

Initial Description
Get google pagerank of websites

Initial Title
Get Google Pagerank

Initial Tags
page, google

Initial Language
PHP