Google is today one of the most important website in world wide web, Google search result has become one of the most important services for world wide web users.
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 pageranks and baclinks with the help of 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 file from here
<?php
//Include and initiate the class this line tutorial assumes that this code and class are situated in same folder
include_once("class.googlepr.php");
//initate a new object
$rank = new GooglePR();
//Query the pagerank of website
echo “PageRank : ” .$gpr->GetPR(“http://www.mrdbs.com/”) .“\n”;
?>
{ 2 comments… read them below or Shout @ me! }
Gaurav, do those classes carry out some calculations based on the search results etc or they directly query the google database or something?
Sidenote: I don’t think its possible to download a php file that ways, you’d have to zip it up. or maybe it is possible since WP guys explicitly have an option to move the wp-config.php files out of the web accessible paths now. But certainly not easy or straight forward.
@Shantanu
This class produce a checksum from the google search results and compute pagerank from it.
Thanks for pointing it out, Edited the post with correct download file.
I actually started to look for ranking algos to make this
http://hindihosting.com/rank/?site=gauravmishra.info
And found that there were numerous posts on web asking method of computing pagerank through php. But no answer.
So thought of posting it