Как получить ТИЦ и PR средствами php
Code (php)
-
-
-
function fetch($source, $start, $smlen, $stop, $fail) {
-
return 0;
-
}
-
else {
-
}
-
}
-
function GooglePageRank($url){
-
$url = $arr[‘host’];
-
$url="info:".$url; $ch=GoogleCSum($url,0xE6359A60);
-
$query ="GET /search?client=navclient-auto&ch=6".$ch."&ie=UTF-8&oe=UTF-8&features=Rank&q=".rawurlencode($url)." HTTP/1.0\r\n";
-
$query.="Host: $host\r\n"; $rank=-1;
-
$query.="User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n";
-
$query.="Connection: Close\r\n\r\n";
-
if ($fp){
-
foreach ($data as $line)
-
}
-
}
-
return $rank;
-
}
-
function GoogleCSum($s,$key){
-
if ($len>=12)
-
for($i=0;$i
-
[Error: Irreparable invalid markup (‘<floor($len/12);$i++){>’) in entry. Owner must fix manually. Raw contents below.]
-
-
Некоторое время назад потребовалось узнавать эти параметры для нескольких сайтов, достаточно часто и удобно. Порылся в интернете и нашёл два скрипта.
-
<lj-cut rext="код скриптов под катом">
-
ДЛЯ ПОЛУЧЕНИЯ PR
-
function fetch($source, $start, $smlen, $stop, $fail) {
-
return 0;
-
}
-
else {
-
}
-
}
-
function GooglePageRank($url){
-
$url = $arr[‘host’];
-
$url="info:".$url; $ch=GoogleCSum($url,0xE6359A60);
-
$query ="GET /search?client=navclient-auto&ch=6".$ch."&ie=UTF-8&oe=UTF-8&features=Rank&q=".rawurlencode($url)." HTTP/1.0\r\n";
-
$query.="Host: $host\r\n"; $rank=-1;
-
$query.="User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\r\n";
-
$query.="Connection: Close\r\n\r\n";
-
if ($fp){
-
foreach ($data as $line)
-
}
-
}
-
return $rank;
-
}
-
function GoogleCSum($s,$key){
-
if ($len>=12)
-
for($i=0;$i<floor($len/12);$i++){
-
$edi=unsign(($edi-$esi-$edx)^($edx << 8));
-
$esi=unsign(($esi-$edx-$edi)^shr($edi,13));
-
$edx=unsign(($edx-$edi-$esi)^shr($esi,12));
-
$edi=unsign(($edi-$esi-$edx)^($edx << 16));
-
$esi=unsign(($esi-$edx-$edi)^shr($edi,5));
-
$edx=unsign(($edx-$edi-$esi)^shr($esi,3)); $ebx=$edx;
-
$edi=unsign(($edi-$esi-$ebx)^($ebx << 10));
-
$esi=unsign(($esi-$ebx-$edi)^shr($edi,15));
-
$v4-=12; $p+=12;
-
}
-
$esi=unsign($esi+$len);
-
else
-
else
-
$ebx=unsign(($ebx-$edi-$esi)^shr($esi,13));
-
$edi=unsign(($edi-$esi-$ebx)^($ebx << 8));
-
$esi=unsign(($esi-$ebx-$edi)^shr($edi,13));
-
$ebx=unsign(($ebx-$edi-$esi)^shr($esi,12));
-
$edi=unsign(($edi-$esi-$ebx)^($ebx << 16));
-
$esi=unsign(($esi-$ebx-$edi)^shr($edi,5));
-
$ebx=unsign(($ebx-$edi-$esi)^shr($esi,3));
-
$edi=unsign(($edi-$esi-$ebx)^($ebx << 10));
-
$esi=unsign(($esi-$ebx-$edi)^shr($edi,15)); return $esi;
-
}
-
function shr($x,$y) {
-
$x=unsign($x);
-
}
-
function unsign($l) {
-
if ($l>=0){
-
return $l;
-
}
-
else{
-
return 4294967296+$l;
-
}
-
}
-
-
-
if( $website ){
-
$website = "http://".$website;
-
}
-
$pr = GooglePageRank($website);
-
$indexed = $indexedpages[google][0];
-
$links = $linkedpages[google][0];
-
// checking Google
-
$source = ‘http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A’.$target;
-
$data[‘Google’] = array(fetch($source, ‘of about’, 9, ‘linking’, ‘did not match any documents’), $source);
-
//print_r ($data[’Google’]);
-
}
-
-
ДЛЯ ПОЛУЧЕНИЯ тИЦ
-
$cy=$match[1];
-
-

