Domain Empire

Bulk Fake Pagerank Checker.

Spaceship Spaceship
Watch
Just posting this for people that want something that will check a lot of fake page ranks. I have not tested it fully, but I think upwards of 500~3000 would be a limit.

The output is in the form of a csv delimited file. You can copy and paste the output into a file NAMEME.csv and open up in a excel type of spreadsheet software. Sort the results and there you go. :D If it can not find the info: page it will print out the url of the site with a link to the info:. I have came accross a few that showed that it was pointing towards another domain. I am not that great at preg_match so if someone would update it so it would not return a false not found.

This is not a public domain script. You may not sell, resell it. You can not publish it on other forums, websites, and etc without the copyright notice in place. You may not claim the work as you own. All rights remain with AllStar of Onic Designs.

fakepagerank.php (paste your list into the box without the http:// on the url.
www is just fine to have.
Code:
<?php

//copyright 2007 -> AllStar -> http://onicdesigns.com
set_time_limit(0);
ob_start();

function getweb($website)
{
   if(!$ch = curl_init($website)) {
    echo "Could not connect to $website";
       return;
   }
   curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt ($ch, CURLOPT_HEADER, 0);
   $output = curl_exec($ch);
   curl_close ($ch);
   return $output;
}


function checkpagerank($url)
{ 
    $total = getweb('http://www.google.com/search?hl=en&q=info%3A'.urlencode($url)); 
    $match_expression = '/<span class\=a>(.*)\/<\/span><\/font>/i';
    preg_match($match_expression,$total,$matches); 
    return strip_tags($matches[1]);    
}


function sayln($str)
{
  echo $str."<br />";
  ob_flush();
  flush();
  return;
}

include_once('getpr.php');
$google = new google_pr(); 

 if(isset($_POST['submit']))
 { 
    sayln('Checking for valid pageranks :) Wee...');

    $domains = explode("\n", $_POST['domains']); 
    foreach($domains as $domain)
    {   
        $rurl = null;
        $domain = trim($domain);
        $rurl = checkpagerank($domain);
        if($rurl == $domain)
        {
            $pagerank   = trim($google->get_page_rank('http://'.$domain));
            if($pagerank  != 0)  
             {
               sayln($rurl.','.$pagerank);
             } 
        }
        elseif($rurl == '')
        {
            $pagerank   = trim($google->get_page_rank('http://'.$domain));
            if($pagerank  != 0)  
             {
               sayln('<a href="http://www.google.com/search?hl=en&q=info%3A'.urlencode($domain).'">'.$domain.'</a>,'.$pagerank.',not found');
             }     
        }
    }
 } 
 else 
 { 
?>
<div style="text-align: center">
    <form action="fakepagerank.php" method="post">
        <textarea name="domains" cols="100" rows="20"></textarea>
        <br /><input type="submit" name="submit" value="Check For Valid Pagerank!" style="font-size: 30pt;" />
        
    </form>
</div>
<?php } ?>

(this code below is copyright the orginal author)
getpr.php
Code:
<?php

define('GOOGLE_MAGIC', 0x00000000E6359A60); // CHANGED (64Bit)

class google_pr
{

var $checksum;

function google_pr(){
    $this->checksum='';
}

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; $this->toInt32($a); $a = (int)($a ^ ($this->zeroFill($c,13)));
    $b -= $c; $b -= $a; $this->toInt32($b); $b = (int)($b ^ ($a<<8));
    $c -= $a; $c -= $b; $this->toInt32($c); $c = (int)($c ^ ($this->zeroFill($b,13)));
    $a -= $b; $a -= $c; $this->toInt32($a); $a = (int)($a ^ ($this->zeroFill($c,12)));
    $b -= $c; $b -= $a; $this->toInt32($b); $b = (int)($b ^ ($a<<16));
    $c -= $a; $c -= $b; $this->toInt32($c); $c = (int)($c ^ ($this->zeroFill($b,5)));
    $a -= $b; $a -= $c; $this->toInt32($a); $a = (int)($a ^ ($this->zeroFill($c,3)));
    $b -= $c; $b -= $a; $this->toInt32($b); $b = (int)($b ^ ($a<<10));
    $c -= $a; $c -= $b; $this->toInt32($c); $c = (int)($c ^ ($this->zeroFill($b,15)));
    return array($a,$b,$c);
}

function strord($string) {
    for($i=0;$i<strlen($string);$i++) {
        $result[$i] = ord($string{$i});
    }
    return $result;
}

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 = $this->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);
        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 = $this->mix($a,$b,$c);

    return $mix[2];
}


function getGoogleChecksum($url) {
    $url="info:"."http://".str_replace('http://','',$url);
    $tmp_ch=$this->strord($url);
    $this->checksum=sprintf("%u", $this->GoogleCH($tmp_ch));
    return $this->checksum;
}

function toInt32(& $x) {
    $z = hexdec(80000000);
    $y = (int)$x;
    if($y==-$z&&$x<-$z){
        $y = (int)((-1)*$x);
        $y = (-1)*$y;
    }
    $x = $y;
}

function get_page_rank($url){
  
    $reqgr = "info:".$url;
    $reqgre = "info:".urlencode($url);
    $gch="6".$this->getGoogleChecksum($url);
    $patern = '/^http:/';
    $patern2 = '/^http:\/\/.*google\..*\/(search|images|groups|news).*/';
    $patern3 = '/^http:\/\/localhost.*/';
    $patern4 = '/^http:\/\/(127\.|10\.|172\.16|192\.168).*/'; //local ip
    if(!preg_match($patern, $url) || preg_match($patern2, $url) ||
       preg_match($patern3, $url) || preg_match($patern4, $url)){
           return -1;
    }
    else
    {

   $website = "http://toolbarqueries.google.com/search?client=navclient-auto&ch=".$gch."&ie=UTF-8&oe=UTF-8&features=Rank&q=".$reqgre;
   if(!$ch = curl_init($website)) {
       return 'Count not connect to google.com';
   }
   curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
   curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; GoogleToolbar 3.0.114-big; Windows XP 5.1)');
   curl_setopt ($ch, CURLOPT_HEADER, 0);
   curl_setopt($ch, CURLOPT_TIMEOUT, 20);
   $res['content'] = curl_exec($ch);
   curl_close ($ch);
   
        if(preg_match('/Rank_.*?:.*?:(\d+)/i', $res['content'], $m)) 
        {
              return $m[1];
        }
        else
        {
            return 0;
        }
    }
}
}

?>
 
Last edited:
1
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
WOW, Thanks lot buddy. U are Great
 
0
•••
[link removed]

getting an early error any ideas.
 
Last edited by a moderator:
0
•••
0
•••
Great script. Thanks alot. :)
 
0
•••
I get a false 'not found' as you stated in the start to almost all the names
All the domain's PR is valid
I got about 25 'not found' and 1 OK
 
0
•••
The not found is because it has to be changed up to try to find the domain. I'll see if I can update it to strip a few things and then spit out the correct information.
 
0
•••
Hi!

I'm sure it's a great script but I haven't yet got it to work!

My shared hosting environment means I don't have the cURL installed so I cannot run the script!

I wondered if anyone had found a script similar to this one?

:)
 
0
•••
can u please provide a working demo because my host also does not have cURL due to which I cannot use it :(
 
0
•••
is it possible to fix these errors?
 
0
•••
There is no *errors*. It is due to their host not having cUrl installed they are unable to run it.
 
0
•••
0
•••
Then pagerank is not found. The script does a check for fake pagerank. When you do info:site.com then it should show the domain. If does not show the domain then it is possible it is fake pagerank. When it shows a different website then you did the info for then it is faked.

http://www.google.com/search?q=info:pspvideo.info
 
0
•••
does the script really works? because I tried manually querying google info:domainname
and google asked for a captcha verification, with explanation that google thought I was an automated computer software or virus.
 
0
•••
0
•••
Thanks for the interest asgsoft in the script. WWW. vs NON WWW. www is considered in googles eyes to be a different domain. So, www.domain.com can have a different pagerank as domain.com. So, the script treats www.domain.com and domain.com differently. Over Private message. I have determined that the regex needed an extra / to be included with it. Also, I have noticed that google will in fact issue a "automated computer software". So, bulk fake page rank checks can not be done anymore. Maybe 25 at a time if not done more then that in a given hour. To bad google does not have a api that will allow for this. They have 10 per day query through the api, but that stinks.

As for cUrl. I am not going to do a sockets / file_get_contents version of it, because I lack the knowledge to code in the sockets into it. The cUrl should be placed into a function and checked to be installed if not then check if use of file_get_contents is allowed. If not then resort to sockets. Using Sockets is slow and a pile of crap compared to cUrl (cUrl does sockets, but better and faster then php does) :) Sorry..

.
 
0
•••
So is there any way of checking the validity of "bulk" (200) domains at once?
 
0
•••
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back