PR checker script that actually works?!

Discussion in 'Directories' started by Masetek, Aug 2, 2007.

  1. #1
    Hi guys n girls

    My PR checker has been broken for a while now. Does anyone have a script that actually works, and keeps working?

    The one I have only works on my server (it gets a forbidden error on every other server I've tried it on) and has been doing the job for a while but in the last month it has literally stopped working.

    I need a script that I can easily integrate with my existing system. So basically, I need to be able to pass a URL to a function that will return the pagerank.

    Has anyone got one? A free one would be good, butI don't mind paying for it, but I need to be able to test it on my servers first.

    Let me know..

    Thanks!!

    :)
     
    Masetek, Aug 2, 2007 IP
  2. Freewebspace

    Freewebspace Notable Member

    Messages:
    6,213
    Likes Received:
    370
    Best Answers:
    0
    Trophy Points:
    275
    #2
    I have one at www.livepr.info

    I took it from here

    Search the forums and Google for PR checker script you may get the answer!
     
    Freewebspace, Aug 2, 2007 IP
  3. humm

    humm बहादुर बच्चा

    Messages:
    4,346
    Likes Received:
    850
    Best Answers:
    0
    Trophy Points:
    310
    #3
    Masetek buddy what you have been searching I have been doing the same from appox 3months now, I have searched every possible forum, used google etc etc.

    The only answer is Google has blocked that particular server from PR request. I even took a new dedicated IP but it didn't work for me too. :(
     
    humm, Aug 2, 2007 IP
  4. Masetek

    Masetek Peon

    Messages:
    820
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Yeah this was the problem I had when I was looking for the script originally. The script itself worked, but IPs kept getting blocked. Usually you could tell when the IP was blocked becuase you got a forbidden error. However this is not the case with this current script, it just doesn't return a value.

    I'll keep searching around anyways :)
     
    Masetek, Aug 2, 2007 IP
  5. mikey1090

    mikey1090 Moderator Staff

    Messages:
    15,869
    Likes Received:
    1,055
    Best Answers:
    0
    Trophy Points:
    445
    Digital Goods:
    2
    #5
    well you may have noticed on a lot of bidding directories they have PR checkers. Perhaps you could download that, examine the code, and see what you're doing wrong. have you checked hotscripts.com???
     
    mikey1090, Aug 3, 2007 IP
  6. humm

    humm बहादुर बच्चा

    Messages:
    4,346
    Likes Received:
    850
    Best Answers:
    0
    Trophy Points:
    310
    #6

    Its will work only till google doesn't block that tools server IP address, once its blocked PR will stop working for many since its simple hotlinking.
     
    humm, Aug 3, 2007 IP
  7. saurabhj

    saurabhj Banned

    Messages:
    3,459
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I having a script.
    You can watch it over here

    Price is just 2$...
    Please let me know if you are interested...
     
    saurabhj, Aug 3, 2007 IP
  8. vnviews

    vnviews Peon

    Messages:
    746
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Did you test this one:
    <?php
    define('GOOGLE_MAGIC', 0xE6359A60);
    
    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){
       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]);
      }
      $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;
     }
     
     function get_pagerank($url){
      $ch = "6".GoogleCH(strord("info:" . $url));
    
      $pagerank = 0;
    
      $fp = fsockopen("www.google.com", 80, $errno, $errstr, 30);
      if (!$fp) {
         echo "$errstr ($errno)<br />\n";
      } else {
         $out = "GET /search?client=navclient-auto&ch=" . $ch .  "&features=Rank&q=info:" . $url . " HTTP/1.1\r\n" ;
         $out .= "Host: www.google.com\r\n" ;
         $out .= "Connection: Close\r\n\r\n" ; 
         fwrite($fp, $out);
         while (!feof($fp)) {
           $data = fgets($fp, 128);
           $pos = strpos($data, "Rank_");
             if($pos === false){
             }else{
               $pagerank = substr($data, $pos + 9);
    		if (substr($pagerank,0,2) == "10"){
    			$pagerank = "10";
    	     } else {
    			$pagerank = substr($pagerank,0,1);
    	     }
    	   }
         }
         fclose($fp);
      }
      return $pagerank;
    }
    ?>
    Code (markup):
    Pass url to get_pagerank() and you'll get the PR number in return.
     
    vnviews, Aug 3, 2007 IP
  9. Masetek

    Masetek Peon

    Messages:
    820
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks vnviews, this one is different to the one I was using and works fine on the Directory Critic server! I tested it on a few other servers too and it didn't work, but it doesn't matter really as long as it works on Directory Critic.

    Thanks for posting!
     
    Masetek, Aug 3, 2007 IP