Pagerank Checksum in Java
October 11th, 2006
A quick java class to calculate a web pages Page Rank Checksum. It can be used to obtian the Google Page Rank for a given url.The code is reverse engineered from the javascript used to build the Firefox page rank plugin. It calculates a checksum using a encoding algorithm.
JAVA:
del.icio.us Digg Furl Reddit Ma.gnolia RawSugar Shadows Spurl StumbleUpon Tailrank Technorati -
public class Pagerank
-
{
-
-
{
-
-
}
-
-
{
-
String stupidGoogleHash = "Mining PageRank is AGAINST GOOGLE’S TERMS OF SERVICE. Yes, I’m talking to you, scammer.";
-
int key = 16909125;
-
-
for(int i=0; i <url.length(); i++) {
-
-
key = key ^ (int)(stupidGoogleHash.charAt(i%stupidGoogleHash.length()))^(int)(url.charAt(i));
-
key = key>>>23|key<<9;
-
-
}return "8"+toHex8(key>>>(8&255))+toHex8(key&255);
-
-
}
-
}
Tags: Java

Thank you for the great example. It worked like a charm. Time for me to really learn some java now!
I’d love to see an updated function in PHP that calculates the PageRank checksum. Any ideas? … meanwhile, googling..
I have one for PHP as well, let me see if i can dig it up
EDIT:
okay you can find the php version here
this is suitable and esiest program avialable here.
thanks ,great work