Calculate Google PageRank from PHP

Google is the single most important search engine in the world today, practically all web users will use Google before any other search engines.

A full fledged SEO industry is running on the google pagerank algorithm decided by Google Inc.

I have seen a lot of developers asking the method of getting google pagerank using php.

The Google search results are ranked by page rank.

We are going to use PHP class “Google PR” from phpclasses.org

Download the class from here.

<?
//Include and instansiate the class
include_once("class.googlepr.php");
$rank = new GooglePR();
//Query the PR value for a url
echo "PageRank - " . $rank->GetPR("http://www.test.com/") . "n";
?>

Simples!

Tagged with: , , ,
Posted in PHP

Leave a Reply

Your email address will not be published. Required fields are marked *

*

* Copy this password:

* Type or paste password here:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>