Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > Miscellaneous > Lounge

Notices

Reply
 
Thread Tools Search this Thread
Old 06-28-2004, 02:26 AM   #106
Unregistered
Nameless Being
 
correction; that should be %2F, not %2
  Reply With Quote
Old 06-28-2004, 03:43 AM   #107
Unregistered
Nameless Being
 
it is the slash

%2F is a slash, see http://www.asciitable.com/

Without a trailing slash it isn't a proper URI
  Reply With Quote
Advert
Old 06-28-2004, 06:22 AM   #108
Festiz
Nameless Being
 
Question Different Ch on alex's and homelinux's calc's

Alex & co's calculator:
url: http://www.example.com/
ch: 62863130722

Homelinux's calculator
url: http://www.example.com/
ch: 6540747202

Spot the huge difference?

I get different values for all domains I've tryed. Why? Wasn't your goal to create a free version of theirs?
  Reply With Quote
Old 06-28-2004, 06:48 AM   #109
alexstapleton
Enthusiast
alexstapleton doesn't litteralexstapleton doesn't litter
 
Posts: 49
Karma: 123
Join Date: Jun 2004
http://alex.vort-x.net/google/
It works.

url: http://www.example.com/
ch: 6540747202

See. Any problems your having are due to your server setup. Not the code. Post information on that and we might be able to help. PHP version, whether you modified the script or not, CPU, web server (if any.)
alexstapleton is offline   Reply With Quote
Old 06-28-2004, 06:51 AM   #110
alexstapleton
Enthusiast
alexstapleton doesn't litteralexstapleton doesn't litter
 
Posts: 49
Karma: 123
Join Date: Jun 2004
Quote:
Originally Posted by Unregistered
I just developed a complete all-in-one function in PHP that using The Google Checksum Calculator, by Alex Stapleton, Andy Doctorow, Vijay "Cyberax" Bhatter, and a few others, (https://www.mobileread.com/forums/sho...9&postcount=87) and XMLize.php by Hans Anderson (http://www.hansanderson.com/php/xml/) automatically calculates the PageRank for a page. Try it at:
http://zenitram.th4y.com/pagerank
And the source code is at:
http://zenitram.th4y.com/pagerank/source.txt
Hope you like it
iirc it breaks the google TOS and they can block you for using it?
alexstapleton is offline   Reply With Quote
Advert
Old 06-28-2004, 08:26 AM   #111
Bigg
Nameless Being
 
One nice thing about this is that people won't be able to sell this code for $$$ anymore
  Reply With Quote
Old 06-28-2004, 08:58 AM   #112
Festiz
Nameless Being
 
Quote:
Originally Posted by alexstapleton
http://alex.vort-x.net/google/
It works.

url: http://www.example.com/
ch: 6540747202

See. Any problems your having are due to your server setup. Not the code. Post information on that and we might be able to help. PHP version, whether you modified the script or not, CPU, web server (if any.)
Excuse me if I don't see your point, but I tested yours and the payable versions online so that's why I wondered. Because if you both get different ch's then Only one of the values should be able to use when retreiving the PR
  Reply With Quote
Old 06-28-2004, 10:59 AM   #113
ZeNiTRaM
Nameless Being
 
i don't think they'll block me, there are 1000000s of requests for the Google Toolbar every day, and they can't determine what ones are from my script and what ones not.

However they can change the algorithm, but they need to update all the Google Toolbars out there before they can remove access via the actual algorithm
  Reply With Quote
Old 06-28-2004, 12:34 PM   #114
alexstapleton
Enthusiast
alexstapleton doesn't litteralexstapleton doesn't litter
 
Posts: 49
Karma: 123
Join Date: Jun 2004
they can block requests coming from zenithram.th4y.com. so it is perfectly possile, and easy, for them to block anyone that breaks their TOS.

they can change the algotithm, and all the toolbars automatically, transparently update. but what benefit would that give them?
alexstapleton is offline   Reply With Quote
Old 06-28-2004, 03:45 PM   #115
alexstapleton
Enthusiast
alexstapleton doesn't litteralexstapleton doesn't litter
 
Posts: 49
Karma: 123
Join Date: Jun 2004
Festiz: If you get different results, then your doing something wrong. Because it works and produces the same values as the one at the homelinux address. There is a pagerank fetching form on my website now so you can test that the values work.
alexstapleton is offline   Reply With Quote
Old 06-29-2004, 07:16 AM   #116
Unregistered
Nameless Being
 
Updated by Alex and Bill Zeller.

PHP Code:
<?php
header
("Content-Type: text/plain; charset=utf-8");
/*
* Written by Alex Stapleton
*
* With thanks to Vijay "Cyberax" Bhatter
*   and Andy Doctorow. Probably wouldn't
*   of been possible without their input.
*  
*  PHP code reduction and minor error
*   checking by Bill Zeller
*
*  This code is released into the public domain.
*/

function shr($a$b){ // unsigned shift right
    
return (2147483648 $a)?((($a>>1) & 
~
2147483648)|0x40000000)>>($b-1):($a>>$b);
}

function 
mix(&$x) {
  for(
$a=array(array(13,8,13),array(12,16,5),array(3,10,15)),$i=0;$i<3;$i++)
    for(
$j=0;$j<3;$j++,$d=$x[0]<<($a[$i][1]))
      
$x[$j]=($x[$j]-$x[($j+1)%3]-$x[($j+2)%3])^($j==1?$d:shr($x[($j+2)%3],$a[$i][$j]));
}

function 
GoogleCH($url) {
    
$url array_slice(unpack('c*','info:'.$url),0);
    
$x = array(0x9E3779B90x9E3779B90xE6359A60);
    for(
$k=0,$len=$length=sizeof($url);$len>=12;$k+=12,$len-=12){
        
$u=array_slice($url,$k);
        for(
$i=0;$i<4;$i++)
            for(
$j=0;$j<3;$j++)
                
$x[$j] += $u[$j*4+$i]<<(8*$i);
        
mix($x);
    }
    
$u array_slice($url,$k);
    for(
$l=$len,$x[2]+=$length,$i=0;$i<&& $l<12;$i++)
        for(
$j=0;$j<3;$j++)
            
$x[$j]+=$l>($j*4+$i)?$u[$j*4+$i]<<(8*$i):0;
    
mix($x);
    return 
sprintf('6%u'$x[2]);
}

// [url]http://www.example.com/[/url] - Checksum: 6540747202
$url $_GET['url'];
echo 
"url:\t$url\n";
$ch GoogleCH($url);
echo 
"ch:\t$ch\n";
$url 'info:'.urlencode($url);
$link 
"http://www.google.com/search?client=navclient-auto&ch=6$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=$url";
print(
"\n\nPage Rank URL: $link");
?>
  Reply With Quote
Old 06-29-2004, 11:57 AM   #117
Unregistered
Nameless Being
 
Convert PHP > Delphi is possible ?
  Reply With Quote
Old 06-29-2004, 01:45 PM   #118
uncopyrightable
Nameless Being
 
I'm almost finished converting this algorithm to Delphi.
But there is a stupid mistake in my code that I can't find
Probably it is during unaccurate work with data types.
Before last mix(a,b,c) it returns correct b and c but wrong a.
If you wish I can publish my code here.
CU,
uncopyrightable
P.S: sorry for my English.
  Reply With Quote
Old 06-30-2004, 02:45 AM   #119
Unregistered
Nameless Being
 
Windows tool based on above's code:

http://www.my-eldorado.net/GGChecksumRecovery.zip
  Reply With Quote
Old 06-30-2004, 03:40 AM   #120
Unregistered
Nameless Being
 
Very good tools ! Thanks !!
  Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Seriously thoughtful Dekker's Algorithm help. Catire Lounge 13 03-19-2010 10:03 AM
Bulk Pagerank Checker Script? SNaRe Lounge 2 10-22-2006 04:36 PM
Google Toolbar Pagerank Checksum Revealed! Alexander Turcic Lounge 5 02-17-2006 08:09 AM
Google Checksum CH calculator cyberax Lounge 2 08-17-2004 09:37 PM


All times are GMT -4. The time now is 06:41 AM.


MobileRead.com is a privately owned, operated and funded community.