Wednesday, August 1, 2012

Google PageRank checksum algorithm

The Google PageRank functionality in Google Toolbar works by querying Google's server for information on the PageRank of a specific page. This might seem easy enough to implement in your own program/website, but the problem is that the toolbar calculates a checksum on the page URL before querying the server, and the server only responds if the checksum is correct. Fortunately the checksum algorithm was reverse engineered from Google Toolbar 7. I was provided the hand decompiled version of the algorithm in C from a friend. Then I went ahead and rewrote it in PHP for web development usage. You can find both versions below.

As an example, the query URL for the page '' is

Any other query with a checksum other than 783735859783 will result in a '403 forbidden' response.

C Version (original): PHP Version:

~ Dmitry


  1. Very cool, but i wonder how quickly they modify their checksum now that this is out.

  2. This is the ruby implementation I did for the gem PageRankr:

    Google hasn't changed the algorithm since I first wrote my implementation, which was in 2010.

  3. AFAIK it's been changed in 2011.