1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Google pagerank script?

Discussion in 'HTML & JavaScript' started by Sunlight Media, Jul 20, 2010.

  1. Sunlight Media

    Sunlight Media Newbie

    Joined:
    Mar 23, 2010
    Messages:
    5
    Likes Received:
    0
    Location:
    Ontario
    Home Page:
    Hey guys,

    Does anyone here have a script that will give the Google pagerank of a given site?

    Thanks
     
  2. manudevil20

    manudevil20 Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 28, 2008
    Messages:
    695
    Likes Received:
    278
    Location:
    Idaho
    I usually just use this site
    Code:
    http://www.seoserp.com/web_tools/google_top_1000_serps_checker.asp
     
  3. Lionel

    Lionel Newbie

    Joined:
    Jul 11, 2010
    Messages:
    17
    Likes Received:
    2
    I've installed firefox page rank add on, can't link but it's pretty easy to find.
     
  4. Sunlight Media

    Sunlight Media Newbie

    Joined:
    Mar 23, 2010
    Messages:
    5
    Likes Received:
    0
    Location:
    Ontario
    Home Page:
    Thanks for the reply guys.

    I'm looking for a script to pull it automatically for a project I'm working on.. I don't really have an problem finding the PR's, just need to add the script to something and I know they recently changed how it's accessed..
     
  5. deziner

    deziner Newbie

    Joined:
    Oct 22, 2010
    Messages:
    25
    Likes Received:
    15
    I have a php script that does it :)
    Really easy, have built quite a lot of tools to show the PR :)
     
  6. Sunlight Media

    Sunlight Media Newbie

    Joined:
    Mar 23, 2010
    Messages:
    5
    Likes Received:
    0
    Location:
    Ontario
    Home Page:
    Thanks man, I appreciate the offer but we got it sorted out :D
     
  7. SocialSubmitter2010

    SocialSubmitter2010 Newbie

    Joined:
    Oct 23, 2010
    Messages:
    9
    Likes Received:
    0
    I would love a php script that does this if anyone cares to share one with me thats free to download.

    Thanks
     
  8. kensai

    kensai Junior Member

    Joined:
    May 5, 2010
    Messages:
    100
    Likes Received:
    42
    try seoquake addon for firefox/chrome really does the job + more
     
  9. SocialSubmitter2010

    SocialSubmitter2010 Newbie

    Joined:
    Oct 23, 2010
    Messages:
    9
    Likes Received:
    0
    Thanks but im looking for a php script I can use within a website not an add-on for a browser

    Thanks anyway
     
  10. JamesWhite

    JamesWhite Newbie

    Joined:
    Nov 13, 2010
    Messages:
    5
    Likes Received:
    0
    Occupation:
    Just time pass and make a new friend
    Location:
    California
    Really this is scripts are very good for every user so thanks for the sharing this information...
     
  11. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    :D:D:D GIMMY A KISS!!

    PHP:
    <?

    $dir_list file("sites.txt");
    foreach (
    $dir_list as $url1){    
    $url1=trim($url1);            
                
    $url parse_url('http://' ereg_replace('^http://'''$url1));
                
    $url['full'] = 'http://' ereg_replace('^http://'''$url);
                
    $url 'info:' $url['host'].$url['path'] ;
                
    //echo substr($url['path'],1) ;exit;
                
    $checksum checksum(strord($url));
                
    $url "http://www.google.com/search?client=navclient-auto&ch=6$checksum&features=Rank&q=$url";
                
    $data = @file_get_contents($url);
                
    preg_match('#Rank_[0-9]:[0-9]:([0-9]+){1,}#si'$data$p);
                
    $value = ($p[1]) ? $p[1] : 0;
               
    // echo "<b>PR= ".$value." </b>".$url1."<br>";
               
    if($value 0){
                echo 
    "<b>".$url1."||".$value."</b><br>";
                }else{
                 echo 
    $url1."||".$value."<br>";
                }

    }


    function 
    mix ($a$b$c) {
                
    $a -= $b$a -= $cto_int_32($a); $a = (int)($a ^ (zero_fill($c13)));
                
    $b -= $c$b -= $ato_int_32($b); $b = (int)($b ^ ($a << 8));
                
    $c -= $a$c -= $bto_int_32($c); $c = (int)($c ^ (zero_fill($b13)));
                
    $a -= $b$a -= $cto_int_32($a); $a = (int)($a ^ (zero_fill($c12)));
                
    $b -= $c$b -= $ato_int_32($b); $b = (int)($b ^ ($a << 16));
                
    $c -= $a$c -= $bto_int_32($c); $c = (int)($c ^ (zero_fill($b5)));
                
    $a -= $b$a -= $cto_int_32($a); $a = (int)($a ^ (zero_fill($c3)));
                
    $b -= $c$b -= $ato_int_32($b); $b = (int)($b ^ ($a << 10));
                
    $c -= $a$c -= $bto_int_32($c); $c = (int)($c ^ (zero_fill($b15)));
                return array(
    $a,$b,$c);
            }

    function 
    checksum ($url$length null$init 0xE6359A60) {
                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 
    $c += ($url[$k 8] << 8);
                    case 
    $b += ($url[$k 7] << 24);
                    case 
    $b += ($url[$k 6] << 16);
                    case 
    $b += ($url[$k 5] << 8);
                    case 
    $b += ($url[$k 4]);
                    case 
    $a += ($url[$k 3] << 24);
                    case 
    $a += ($url[$k 2] << 16);
                    case 
    $a += ($url[$k 1] << 8);
                    case 
    $a += ($url[$k 0]);
                }
                
    $mix mix($a$b$c);
                return 
    $mix[2];
            }
            
            function 
    strord ($string) {
                for(
    $i 0$i strlen($string); $i++) {
                    
    $result[$i] = ord($string{$i});
                }
                return 
    $result;
            }
    function 
    to_int_32 (&$x) {
                
    $z hexdec(80000000);
                
    $y = (int) $x;
                if(
    $y ==- $z && $x <- $z){
                    
    $y = (int) ((-1) * $x);
                    
    $y = (-1) * $y;
                }
                
    $x $y;
            }
            
            function 
    zero_fill ($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;
            }

    ?>
     
    • Thanks Thanks x 1
  12. notrin

    notrin Power Member

    Joined:
    Apr 15, 2010
    Messages:
    643
    Likes Received:
    71
    Occupation:
    Self Employed Web Master
    Location:
    Montana, USA
    thanks much for this
     
  13. Ceg3xow

    Ceg3xow Newbie

    Joined:
    Jul 6, 2011
    Messages:
    18
    Likes Received:
    1
    awesome, thank you very much
     
  14. drytech

    drytech BANNED BANNED

    Joined:
    May 26, 2011
    Messages:
    115
    Likes Received:
    72

    I added the above code to an empty php file. when I execute the file it comes up blank. I created the site.txt file, what else do I need to do?
    Thanks in advance.