發新話題 Report thanks

Google PageRank 研究

Google PageRank 研究
目的:了解如何得知網站在Google PageRank 的得分,有關PageRank 的介紹請看為什麼使用Google

www.hoyo.idv.tw

根據投票制結果,我還差812票才可以提升到5,看來還要很久的時間才有可能吧^^

目前較準的方式還是由google.com/search 計算出PageRank 的方式,因為link 的方式有的網站就只有一個,還是有2分的PageRank 的分數

1.link
link:www.hoyo.idv.tw
約有355項符合link:www.hoyo.idv.tw的查詢結果,所以Google PageRank 為4

Toolbar PageRank Real PageRank
0/10       0.15-0.9
1/10       0.9-5.4
2/10       5.4-32.4
3/10       32.4-194.4
4/10       194.4-1,166.4
5/10       1,166.4-6,998.4
6/10       6,998.4-41,990.4
7/10       41,990.4-251,942.4
8/10       251,942.4-1,511,654.4
9/10       1,511,654.4-9,069,926.4
10/10      9,069,926.4-0.85×N +0.15

2.google.com/search
複製內容到剪貼板
代碼:
<?php

/*
Filename   :pagerank.php
Description :Google PageRank Checksum Algorithm (Toolbar 3.0.x)
Author    :Jet Marx  <smith (at)aboutsledge (dot)com>
License   :UPL
Log     :Ver 0.1  2005-09-13
Ver 1.0  2005-10-19  Final Character Bug Fixed
*/

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

function StrToNum($StrArray,$Checksum,$MagicNum)
{
$length =sizeof($StrArray);
for($i=0;$i<$length;$i++){
$Checksum *=$MagicNum;
$Checksum =(int)$Checksum; //Force to Integer Overflow
$Checksum +=$StrArray[$i];
$Checksum =(int)$Checksum;
}
return $Checksum;
}

function Check($String)
{
$Checksum1=0x1505;
$Checksum2=0;

$StrArray =StrOrd($String);
$Checksum1=StrToNum($StrArray,$Checksum1,0x21);
$Checksum2=StrToNum($StrArray,&$Checksum2,0x1003F);

$Checksum1>>=2;
$Checksum1=(($Checksum1>>4)&0x3FFFFC0)|($Checksum1&0x3F);
$Checksum1=(($Checksum1>>4)&0x3FFC00)|($Checksum1&0x3FF);
$Checksum1=(($Checksum1>>4)&0x3C000)|($Checksum1&0x3FFF);

$T1= (((($Checksum1&0x3C0)<<4)|($Checksum1&0x3C))<<2)|($Checksum2&0xF0F );
$T2= (((($Checksum1&0xFFFFC000)<<4)|($Checksum1&0x3C00))<<0xA)|($Checksum2&0xF0F0000);

return $Checksum1=$T1|$T2;
}

function CheckMore($Checksum)
{
$CheckChar =0;
$Flag    =0;

$CheckStr =sprintf("%u",$Checksum);
$length  =strlen($CheckStr);

for($i=$length-1; $i>=0; $i --){
$Re =$CheckStr{$i};
if (1==($Flag%2)){
$Re +=$Re;
$Re =(int)($Re/10)+($Re%10);
}
$CheckChar =$Re +$CheckChar;
$Flag ++;
}

$CheckChar %=10;
if (0!==$CheckChar){
$CheckChar =10-$CheckChar;
$length =$CheckChar %2;
if (1===($Flag%2)) {
if (1===$length ){
$CheckChar +=9;
}
//$CheckChar -=$length;
$CheckChar >>=1;
}
}
return $CheckChar;
//return $CheckChar =(10-$CheckChar%10)%10;
}

if (isset ($_GET['url'])){

$Checksum =Check($_GET['url']);
echo "<a href="http://www.google.com/search?client=navclient-auto&features=Rank:&q=info:";
echo $_GET['url']."&ch=7".CheckMore($Checksum);
printf("%u",$Checksum);
echo "">Get PageRank</a><br /><br />Powered by upsdn.net";
}else{
echo "<form action=""method="get"id="prform">";
echo "  <br />URL:<input name="url"value="http://www.debian.org/"type="text"size=40>";
echo "</form>";
echo "<a href="javascript:document.getElementById('prform').submit();">Submit</a>";
echo "<br /><br />Powered by upsdn.net";
}
?>
如果您喜歡這篇文章,請按「讚」或分享給您的朋友,以示鼓勵。

TOP

thanks