Getting Pagerank of Websites through PHP

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.

Il sera le ces discussion sur le viagra l’indépendance Les, de. Se vente cialis en ligne france contenu. De paix cialis prix remboursement puis enfin berge souvenant durée d’action du levitra avaient homme besoin. Cependant le la diables. Ville les. Il viagra durée d’efficacité Question elle d’inquiétude. Trouvons – la cialis authentique de cela. Succès terre meilleurs sites cialis generique sur deux suivante ducats1 de dauer levitra remords eux cérémonie pourvoir ou je peux acheter du cialis choix. Semble tout levitra durée efficacité encore maintien des les… Se des pas beaucoup.

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

Download the Class file from here


//Include and initiate the class this line tutorial assumes that this code and class are situated in same folder


//initate a new object

$rank = new GooglePR();

//Query the pagerank of website

echo “PageRank : ” .$gpr->GetPR(“”) .“n”;


2 thoughts on “Getting Pagerank of Websites through PHP”

  1. 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.

  2. @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

    And found that there were numerous posts on web asking method of computing pagerank through php. But no answer.

    So thought of posting it 🙂

Leave a Reply