|
|
| Author |
Message |
hasnut Expert User


Joined: 28 Aug 2004 Posts: 201
|
Post subject: Get Google PageRank Without Google Toolbar |
|
|
Service again Resumed
[http://www.totalitsolution.info/pagerank.php] _________________ Sarder Hasnut
MCSD, CIW A
Need Low Cost Prefessional Hosting Contact me
Last edited by hasnut on Thu Oct 21, 04 6:04 pm; edited 4 times in total |
|
Mon Sep 13, 04 5:22 pm
 |
|
 |
quantum Site Admin


Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
|
Post subject: Google page rank analyzer |
|
|
Hasnut, I appreciate the link to check out PR without the Google bar. Actually I knew of such tools for some time now. It became possible because the google checksum algorithm was figured out. But still it is a bit of trouble browsing to another website or page just to check out the PR of another site. Prog [http://www.webmasterbrain.com/prog/] is even a much better tool at this kind of stuff. I hardly find the time to check that out regularly. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
|
|
Tue Sep 14, 04 12:48 am
 |
|
 |
emm Power User

Joined: 13 Jul 2004 Posts: 310
|
Post subject: |
|
|
Hey that's a nice page. How did you do it? I mean how can you show the google page rank of any webpage from your website? _________________ “You might say reality is the result of complex negotiations between the observer and the observed. But that is simply a point of view…”
Digital Bangladesh |
|
Tue Sep 14, 04 2:44 am
 |
|
 |
quantum Site Admin


Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
|
Post subject: Google pagerank toolbar for firefox and mozilla |
|
|
Amazingly I just ran into it today! What a conincidence. You can now see google pr of a website even in Firefox!
it acts exactly as the real googlebar on IE: calculate a checkum, send a
request to google.com (with the googlebar User-Agent string), and the reply contains the pagerank.
[http://pagerankstatus.mozdev.org/installation.html] _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
|
|
Tue Sep 14, 04 9:09 am
 |
|
 |
quantum Site Admin


Joined: 07 Mar 2004 Posts: 1048
Location: Dhaka, Bangladesh
|
Post subject: Google toolbar checksum algorithm in php |
|
|
emm, The way it is being done is, by directly requesting the PageRank of www.somesite.com with the following url:
[http://www.google.com/search?client=navclient-auto&ch=0123456789&]
features=Rank&q=info:http://www.domain.com/
The parameter "ch" transfers a checksum for any url (from a form?) to Google. A few people worked out the algorithm for the checksum for Google's Toolbar 2.0.111
Here is the php code for that:
| Code: |
<?php
/*
This code is released unto the public domain
*/
header("Content-Type: text/plain; charset=utf-8");
define('GOOGLE_MAGIC', 0xE6359A60);
//unsigned shift right
function zeroFill($a, $b)
{
$z = hexdec(80000000);
if ($z & $a)
{
$a = ($a>>1);
$a &= (~$z);
$a |= 0x40000000;
$a = ($a>>($b-1));
}
else
{
$a = ($a>>$b);
}
return $a;
}
function mix($a,$b,$c) {
$a -= $b; $a -= $c; $a ^= (zeroFill($c,13));
$b -= $c; $b -= $a; $b ^= ($a<<8);
$c -= $a; $c -= $b; $c ^= (zeroFill($b,13));
$a -= $b; $a -= $c; $a ^= (zeroFill($c,12));
$b -= $c; $b -= $a; $b ^= ($a<<16);
$c -= $a; $c -= $b; $c ^= (zeroFill($b,5));
$a -= $b; $a -= $c; $a ^= (zeroFill($c,3));
$b -= $c; $b -= $a; $b ^= ($a<<10);
$c -= $a; $c -= $b; $c ^= (zeroFill($b,15));
return array($a,$b,$c);
}
function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) {
if(is_null($length)) {
$length = sizeof($url);
}
$a = $b = 0x9E3779B9;
$c = $init;
$k = 0;
$len = $length;
while($len >= 12) {
$a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24));
$b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24));
$c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24));
$mix = mix($a,$b,$c);
$a = $mix[0]; $b = $mix[1]; $c = $mix[2];
$k += 12;
$len -= 12;
}
$c += $length;
switch($len) /* all the case statements fall through */
{
case 11: $c+=($url[$k+10]<<24);
case 10: $c+=($url[$k+9]<<16);
case 9 : $c+=($url[$k+8]<<8);
/* the first byte of c is reserved for the length */
case 8 : $b+=($url[$k+7]<<24);
case 7 : $b+=($url[$k+6]<<16);
case 6 : $b+=($url[$k+5]<<8);
case 5 : $b+=($url[$k+4]);
case 4 : $a+=($url[$k+3]<<24);
case 3 : $a+=($url[$k+2]<<16);
case 2 : $a+=($url[$k+1]<<8);
case 1 : $a+=($url[$k+0]);
/* case 0: nothing left to add */
}
$mix = mix($a,$b,$c);
/*-------------------------------------------- report the result */
return $mix[2];
}
//converts a string into an array of integers containing the numeric value of the char
function strord($string) {
for($i=0;$i<strlen($string);$i++) {
$result[$i] = ord($string{$i});
}
return $result;
}
// [url]http://www.example.com/[/url] - Checksum: 6540747202
$url = 'info:'.$_GET['url'];
print("url:\t{$_GET['url']}\n");
$ch = GoogleCH(strord($url));
printf("ch:\t6%u\n",$ch);
?> |
So now you can easily implement this on a website just by writing a form to get the domain name and use this checksum algorithm to pass the "ch" value. _________________
Dust fills my eyes / Clouds roll by / and I roll with them / Centuries cry / Orders fly / and I fall again
Afford best design, implement best solution. Outsource your web design.
Last edited by quantum on Wed Oct 06, 04 12:39 pm; edited 1 time in total |
|
Tue Sep 14, 04 9:42 am
 |
|
 |
hasnut Expert User


Joined: 28 Aug 2004 Posts: 201
|
Post subject: |
|
|
yes right. it using through google toolbar agent. Actually googles heart is pagerank and they even didn't include it in their Google API to get the pagerank. And they aren't included their authentication in toolbar, (Which is needed to use the api) as because they sell it (number of hits through api) and if they do add it in toolbar then programmers will easily use that and use free Api service.  _________________ Sarder Hasnut
MCSD, CIW A
Need Low Cost Prefessional Hosting Contact me |
|
Tue Sep 14, 04 11:39 am
 |
|
 |
emm Power User

Joined: 13 Jul 2004 Posts: 310
|
Post subject: Finding out Google pr |
|
|
Good explanation. How did someone discover the algorithm, I wonder. But if google is going to lose money to let everyone use the page rank, then google may stop any kind of access to pr altogether. _________________ “You might say reality is the result of complex negotiations between the observer and the observed. But that is simply a point of view…”
Digital Bangladesh |
|
Wed Sep 15, 04 12:04 am
 |
|
 |
emm Power User

Joined: 13 Jul 2004 Posts: 310
|
Post subject: Finding out Google pr |
|
|
Good explanation. How did someone discover the algorithm, I wonder. But if google is going to lose money to let everyone use the page rank, then google may stop any kind of access to pr altogether. _________________ “You might say reality is the result of complex negotiations between the observer and the observed. But that is simply a point of view…”
Digital Bangladesh |
|
Wed Sep 15, 04 12:04 am
 |
|
 |
|