Inventive Design Services in Indianapolis
Check the Google pagerank of your domain.
function GetRank($url, $ch) { $rankfile='http://www.google.com/search?client=navclient-auto&ch=6'.$ch.'&features=Rank&q='.urlencode($url); $contentrank = file_get_contents($rankfile); $contentrank = preg_replace("/Rank_[0-9]{1}:[0-9]{1}:/","",$contentrank); if (is_numeric(intval($contentrank))) { return $contentrank; } else { return "NA"; } } define('GOOGLE_MAGIC', 0xE6359A60); class GooCh { var $google_magic; var $url; var $url_old; var $ch; var $style; var $pr; var $error; var $use_db = FALSE; function GooCh($url, $text = 'Text', $style = 'bb') { global $db; $url=str_replace("http://", "",$url); $this->url =$url; $this->google_magic = 0xE6359A60; $this->ch = $this->GoogleCH($this->strord($this->url)); $this->pr = $this->GetRank($url); return true; } function getNewCheckSum($url){ $url=str_replace("http://", "",$url); return "6".$this->GoogleCH($this->strord($url)); } function GetRank($url) { return $this->ch; } function Show_Text() { echo $this->pr; } //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 ^= ($this->zeroFill($c,13)); $b -= $c; $b -= $a; $b ^= ($a<<8); $c -= $a; $c -= $b; $c ^= ($this->zeroFill($b,13)); $a -= $b; $a -= $c; $a ^= ($this->zeroFill($c,12)); $b -= $c; $b -= $a; $b ^= ($a<<16); $c -= $a; $c -= $b; $c ^= ($this->zeroFill($b,5)); $a -= $b; $a -= $c; $a ^= ($this->zeroFill($c,3)); $b -= $c; $b -= $a; $b ^= ($a<<10); $c -= $a; $c -= $b; $c ^= ($this->zeroFill($b,15)); return array($a,$b,$c); } function GoogleCH($url, $length=null) { if(is_null($length)) { $length = sizeof($url); } $a = $b = 0x9E3779B9; $c = $this->google_magic; $len = $length; $k = 0; 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) { /* 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 = $this->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;$iThe Pagerank Checker SEO Tool will check your page and determines how important it is on the web, according to Google's pagerank system.
( Example: yoursite.com )
// Exc. After form submission if($_SERVER['REQUEST_METHOD']=="POST" && isset($_POST['url']) && $_POST['url'] != "") { $url = 'info:'.$_POST['url']; $ch=new GooCh($url); $ch=$ch->pr; if($ch != "0") { $rank = GetRank($url, $ch); }else{ $rank = "na"; } $rank= trim($rank); switch ($rank) { case "0" : $sugg="You have zero Google rank. Your website could be extremely new. You need to start exchanging links with similar websites to build up a PageRank."; break; case "1": $sugg="You have none or a poor Google rank. You need more quality incoming links to help build up the rank."; break; case "2" : $sugg="You have an average Google rank. Your website seems steady and known by many users."; break; case "3" : $sugg="You have an average Google rank. Your website seems steady and known by many users."; break; case "4" : $sugg="You have a good Google rank. Your website is trusted by many users and companies."; break; case "5" : $sugg="You have a good Google rank. Your website is trusted by many users and companies."; break; case "6" : $sugg="You have an excellent Google rank. Your website is extremely popular to the web users."; break; case "7" : $sugg="You have an excellent Google rank. Your website is extremely popular to the web users."; break; case "8" : $sugg="You have a top of the range Google rank. Your website should now be known by a large amount of users on the internet."; break; case "9" : $sugg="You have a top of the range Google rank. Your website should now be known by almost everyone on the internet."; break; case "10" : $sugg="You have a top of the range Google rank. Your website should now be known by everyone on the internet."; break; } ?>
TIP: =$sugg?>
} ?>
Share and enjoy: