src/Net/HTTP/PageRank.php
public static function get( $url )
	{
		$checksum	= "6".self::calculateChecksum( self::strord( "info:".$url ) );
		$googleUrl	= "www.google.com/search?client=navclient-auto&ch=".$checksum."&features=Rank&q=info:".$url;
		$curl		= new Net_CURL( $googleUrl );
		$response	= $curl->exec();
		$position	= strpos( $response, "Rank_" );
		if( $position === FALSE )
			throw new Exception( 'Response does not contain Rank.' );
		$pagerank = substr( $response, $position + 9 );
		return (int) $pagerank;
	}
public static function get( $url )
	{
		$checksum	= "6".self::calculateChecksum( self::strord( "info:".$url ) );
		$googleUrl	= "www.google.com/search?client=navclient-auto&ch=".$checksum."&features=Rank&q=info:".$url;
		$curl		= new Net_CURL( $googleUrl );
		$response	= $curl->exec();
		$position	= strpos( $response, "Rank_" );
		if( $position === FALSE )
			throw new Exception( 'Response does not contain Rank.' );
		$pagerank = substr( $response, $position + 9 );
		return (int) $pagerank;
	}
public static function get ( $ url ) { $ checksum = "6" . self :: calculateChecksum ( self :: strord ( "info:" . $ url ) ) ; $ googleUrl = "www.google.com/search?client=navclient-auto&ch=" . $ checksum . "&features=Rank&q=info:" . $ url ; $ curl = new Net_CURL ( $ googleUrl ) ; $ response = $ curl -> exec ( ) ; $ position = strpos ( $ response , "Rank_" ) ; if ( $ position === FALSE ) throw new Exception ( 'Response does not contain Rank.' ) ; $ pagerank = substr ( $ response , $ position + 9 ) ; return ( int ) $ pagerank ; }
Returns Google PageRank.
@access		public
@static
@param		string		$url		URL to check (e.G. www.domain.com)
@return		int
Returns Google PageRank .