PR Check
Mit diesem Script kannst du den Pagerank einer beliebigen
Seite auslesen. Es wird sogar der Pagerank von allen Datencentern bei
Google angezeigt
|
Script: |
$ziel="http://www.domain.de";
$server[0]="toolbarqueries.google.com";
$server[1]="64.233.161.99";
$server[2]="64.233.161.104";
$server[3]="66.102.7.99";
$server[4]="66.102.7.104";
$server[5]="216.239.59.99";
$server[6]="216.239.59.104";
$server[7]="216.239.37.104";
$server[8]="216.239.39.99";
$server[9]="216.239.39.104";
$server[10]="66.102.11.99";
$server[11]="66.102.11.104";
$server[12]="216.239.57.99";
$server[13]="216.239.57.104";
$server[14]="66.102.9.99";
$server[15]="66.102.9.104";
$server[16]="216.239.53.99";
$server[17]="216.239.53.104";
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;
}
$style="height:
1px;width: 50px;border: 1px solid #000000;font-size: 2px;";
$spaltenbreite=5;
$prfarbe="#009900";
$pr2farbe="#ffffff";
define('GOOGLE_MAGIC',
0xE6359A60);
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);
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);
return $mix[2];
}
function strord($string)
{
for($i=0;$i<strlen($string);$i++)
{
$result[$i]
= ord($string{$i});
}
return $result;
}
echo "<table width=100%>
<tr><td width='50%'><strong>Server<br><br></strong></td><td
width='20%'><strong>Pagerank<br><br></strong><td><strong>PR
Anzeige<br><br></strong></td></tr>";
for ($xyz=0;$xyz<=17;$xyz++){
$url = "info:"."$ziel";
$ch = GoogleCH(strord($url));
$summe = sprintf("6%u\n",$ch);
$summe = str_replace("-","",$summe);
$summe = trim($summe);
$google = "http://$server[$xyz]/search?client=navclient-auto&ch=$summe&features=Rank&q=$url";
$abfrage =
fopen("$google",r);
while($zeile =
fgets($abfrage,1024))
{
if (ereg("Rank",$zeile))
{ $daten =
$zeile; }
}
fclose($abfrage);
$pagerank =
substr($daten,9,9);
$pagerank =
trim($pagerank);
$ausgabe.="
<tr><td width='50%'>$server[$xyz]</td><td><strong>$pagerank
</strong> <td><table width=100% border=0 cellspacing=0
title=\"PageRank $pagerank/10\"
style=\"$style\"><tr>";
for($x=1;$x<=$pagerank;$x++){
$ausgabe.="<td
width=$spaltenbreite bgcolor=$prfarbe>$x</td>";
}
for($x=$pagerank+1;$x<=10;$x++){
$ausgabe.="<td
width=$spaltenbreite bgcolor=$pr2farbe>$x</td>";
}
$ausgabe.="</tr></table>";
echo $ausgabe;
$ausgabe="";
}
echo "</td></tr></table>";
|
|