İyinet'e Hoşgeldiniz!

Türkiye'nin En Eski Webmaster Forum'una Hemen Kayıt Olun!

Kayıt Ol!

PageRank scripti

devilsunti

0
İyinet Üyesi
Katılım
5 Eylül 2004
Mesajlar
89
Reaction score
0
acaba pagerank script ini gosteren script i bulabilirmiyim? yada kimde war???
 
T

türkelit

Misafir
Şu meşhur ranking-hits tarzı istersen bende vardır .. bir teşekkür yeterlidir :)

veya alttaki kod da işine fazlasıyla yarar sanırım.
PHP:
<style>
a {font-family:Verdana; font-size:11px; color:#0000FF; text-decoration:none}
p {font-family:verdana; font-size:11px; color:black; text-decoration:none}
td {font-family:verdana; font-size:11px; color:black; text-decoration:none}
tr {font-family:verdana; font-size:11px; color:black; text-decoration:none}
body {font-family:verdana; font-size:11px; color:black; text-decoration:none}
h1 {font-family:verdana; font-size:18px; color:black; font-weight:bold; text-decoration:none}
h2 {font-family:verdana; font-size:15px; color:black; font-weight:bold; text-decoration:none}
</style>
<center>
<h1>Google Page Rank</h1>
<form method="POST">
Site Adresi: <input name='url' value='<?=$_REQUEST['url']; ?>' size="20"><input type="submit" value="Göster">
</form>
<hr>
<?

$website = $_REQUEST['url'];
if( $website ){
	if( !strstr($website,"http://") && !strstr($website,"https://") ){
		$website = "http://".$website;
	}
	$linkedpages = linkcheck($website,'google');
	$indexedpages = GoogleLinks($website);
	
	$pr = GooglePageRank($website);
	$indexed = $indexedpages[google][0];
	$links = $linkedpages[google][0];

	$data = array();
	$target = trim(eregi_replace('http://', '', $website)); 
	// 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);
	// checking Yahoo!
	$source = 'http://search.yahoo.com/search?p=linkdomain%3A'.$target.'&sm=Yahoo%21+Search&fr=FP-tab-web-t&toggle=1';
	$data['Yahoo!'] = array(fetch($source, 'of about', 9, 'for', "we didn't find any web pages"), $source);
	// checking AlltheWeb
	$source = 'http://www.alltheweb.com/search?cat=web&cs=utf8&q=link%3A'.$target.'&rys=0&_sb_lang=pref';
	$data['AlltheWeb'] = array(fetch($source, 'audio1 -', 14, 'results', "no web pagesfound that match your query"), $source);
	// checking AltaVista
	$source = 'http://www.altavista.com/web/results?itag=wrx&q=linkdomain%3A'.$target.'&kgs=1&kls=0';
	$data['AltaVista'] = array(fetch($source, 'altavista found', 15, 'results', "we found 0 results"), $source);

?>
	<table width='400' border='0' cellpadding='5' cellspacing='0'>
		<tr>
			<td align='left' colspan='2'><b>Google bilgileri: </b></td>
		</tr>
		<tr>
			<td><strong>Website</strong></td><td><a href="<?=$website?>"><?=$website?></a></td>
		</tr>
		<tr>
			<td><strong>Page Rank</strong></td><td><?=$pr?> / 10</td>
		</tr>
		<tr>
			<td><strong>Indexili Sayfa</strong></td><td><a href="<?=$indexedpages[google][1]?>"><?=$indexed?></a></td>
		</tr>
		<tr>
			<td><strong>BackLink</strong></td><td><a href="<?=$linkedpages[google][1]?>"><?=$links?></a></td>
		</tr>
	</table>
	<hr>
	<table width='400' border='0' cellpadding='5' cellspacing='0'>
		<tr>
			<td align='center' colspan='2'><h2>Link Popularite Raporu</h2></td>
		</tr>
		<tr>
			<td><strong>Arama Motoru</strong></td><td align='right'><strong>Indexli Link</strong></td>
		</tr>
		<?
		foreach($data as $engine => $result) {
		?>
		<tr>
			<td><a href='<? echo $result[1]; ?>' target='_blank'><? echo $engine; ?></a></td>
			<td align='right'>
			<?
			if($result[0])
				echo $result[0];
			else
				echo 'Yok';
			?>
			</td>
		</tr>
		<?
		$total += ereg_replace("[[:punct:]]", '', $result[0]);
		}
		?>
		<tr>
			<td><strong>Toplam</strong></td>
			<td align='right'><strong><? echo $total; ?></strong></td>
		</tr>
	</table>
</center>
<?
}

function fetch($source, $start, $smlen, $stop, $fail) {
	$data = @implode('', @file($source));
	$data = strip_tags($data);
	$data = strtolower($data);
	$data = str_replace("\n", '', $data);
	$data = str_replace("\r", '', $data);
	
	if(substr_count($data, $fail)) {
		return 0;
	} else {
		$data = substr($data, strpos($data, $start)+$smlen);
		$data = substr($data, 0, strpos($data, $stop));
		return trim($data);
	}
}

function linkcheck($url, $engine) {
	global $total;
	$arr = parse_url($url);
	$url = $arr['host'];
	$path = "http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A".$url;
	if(!file_exists($path)) {
		$data = strtolower(strip_tags(implode("", file($path))));
		$data = substr($data, strpos($data, "of about")+9, strlen($data));
		$data = substr($data, 0, strpos($data, " "));
		if(eregi("[[:alpha:]]", $data)) {
			$results[$engine] = array('0', $path);
		} else {
			$results[$engine] = array($data, $path);
			$total+=str_replace(',', '', $data);
		}
	} else {
		$results[$engine] = array('n/a', $path);
	}
	return $results;
}
function GoogleLinks($url){
	$arr = parse_url($url);
	$url = $arr['host'];
	$engine = 'google';
	$path = 'http://www.google.com/search?q=inurl:'.$url.'&hl=en&lr=&ie=UTF-8&filter=0';
	if(!file_exists($path)) {
		$data = str_replace(' ', ' ', strtolower(strip_tags(@implode('', @file($path))))); 
		if(!strpos($data, 'did not match any documents')) {
			$data = substr($data, strpos($data, 'web results')+12, strlen($data)); 
			$data = trim(substr($data, 0, strpos($data, 'for'))); //echo $data; // TEST
			$data = explode(' ', $data);
			$data = $data[(count($data)-1)];
			$results[$engine] = array($data, $path);
			$total+=str_replace(',', '', $data);
		} else {
			$results[$engine] = array('0', $path);
		}
	} else {
		$results[$engine] = array('n/a', $path);
	}
	return $results;
}

function GooglePageRank($url){
	$arr = parse_url($url);
	$url = $arr['host'];
	$url="info:".$url; $ch=GoogleCSum($url,0xE6359A60);
	$host="toolbarqueries.google.com"; $hostip=gethostbyname($host);
	$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";
	$fp=fsockopen($hostip,80,$errno,$errstr,30);
	if ($fp)
	{ fputs($fp,$query); $data=""; while (!feof($fp)) $data.=fgets($fp,4096); fclose($fp);
	$data=explode("\n",$data);
	foreach ($data as $line)
	if (!is_bool(strpos($line,"Rank_1")))
	{ $rank=explode(":",trim($line)); $rank=$rank[2]; break; } }
	return $rank; 
}

function GoogleCSum($s,$key){
	$v4=$len=strlen($s); $esi=$key; $ebx=$edi=0x9E3779B9; $p=0;
	if ($len>=12)
	for($i=0;$i<floor($len/12);$i++)
	{ $edi=unsign($edi+ord($s[$p+4])+(ord($s[$p+5]) << 8)+(ord($s[$p+6]) << 16)+(ord($s[$p+7]) << 24));
	$esi=unsign($esi+ord($s[$p+8])+(ord($s[$p+9]) << 8)+(ord($s[$p+10]) << 16)+(ord($s[$p+11]) << 24));
	$edx=unsign(($ebx+ord($s[$p+0])+(ord($s[$p+1]) << 8)+(ord($s[$p+2]) << 16)+(ord($s[$p+3]) << 24)-$edi-$esi)^shr($esi,13));
	$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);
	if ($v4>=11) $esi=unsign($esi+(ord($s[$p+10]) << 24));
	if ($v4>=10) $esi=unsign($esi+(ord($s[$p+9]) << 16));
	if ($v4>=9) $esi=unsign($esi+(ord($s[$p+8]) << 8));
	if ($v4>=8) $edi=unsign($edi+ord($s[$p+4])+(ord($s[$p+5]) << 8)+(ord($s[$p+6]) << 16)+(ord($s[$p+7]) << 24));
	else
	{ if ($v4>=7) $edi=unsign($edi+(ord($s[$p+6]) << 16));
	if ($v4>=6) $edi=unsign($edi+(ord($s[$p+5]) << 8));
	if ($v4>=5) $edi=unsign($edi+ord($s[$p+4])); }
	if ($v4>=4) $ebx=unsign($ebx+ord($s[$p+0])+(ord($s[$p+1]) << 8)+(ord($s[$p+2]) << 16)+(ord($s[$p+3]) << 24));
	else
	{ if ($v4>=3) $ebx=unsign($ebx+(ord($s[$p+2]) << 16));
	if ($v4>=2) $ebx=unsign($ebx+(ord($s[$p+1]) << 8));
	if ($v4>=1) $ebx=unsign($ebx+ord($s[$p+0])); }
	$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); 
	for($i=0;$i<$y;$i++) $x=floor($x/2); return $x; 
}
function unsign($l) { 
	$l=intval($l);
	if ($l>=0){
		return $l;
	}else{
		return 4294967296+$l;
	}
}
?>
 

devilsunti

0
İyinet Üyesi
Katılım
5 Eylül 2004
Mesajlar
89
Reaction score
0
dostum cok tesekkur ediyorum
ama
ben derdimi anlatamamisim benim istedigim aslinda tam olarak ranking-hits.de gibi bir sey. yani page rank i kucur 1 gif te gosterecek bir sey...
 
T

türkelit

Misafir
Yukarıda ben ne demişim:
Şu meşhur ranking-hits tarzı istersen bende vardır .. bir teşekkür yeterlidir
 

devilsunti

0
İyinet Üyesi
Katılım
5 Eylül 2004
Mesajlar
89
Reaction score
0
ehuah haklısın. kusura bakma gormemişim...

msn yada icq adresim yaziyor listene eklersen sevinirim. ve bunun icin tesekkurden daha fazlasi gerekir... ama simdilik sadece tesekkur edebilirim...
 

devilsunti

0
İyinet Üyesi
Katılım
5 Eylül 2004
Mesajlar
89
Reaction score
0
peki sen seninkini paylasmak istemisin :) suan icin sanada ancak tesekkur edebilirim. belki ilerde daha fazlasida... ( site çok guzel buarada )
 

Xcoder

0
İyinet Üyesi
Katılım
20 Aralık 2003
Mesajlar
128
Reaction score
0
sagolda bendeki ***** script degil satin aldim. onun icin faylasmak olmaz sanirim.


devilsunti' Alıntı:
peki sen seninkini paylasmak istemisin :) suan icin sanada ancak tesekkur edebilirim. belki ilerde daha fazlasida... ( site çok guzel buarada )
 

devilsunti

0
İyinet Üyesi
Katılım
5 Eylül 2004
Mesajlar
89
Reaction score
0
dostum bu dediğin adreste sadece uye oluyorsun ve sitene kod koyunca pr yi gosteriyor. benim istediği. script. kod deil. almancası anadili olan arkadastan rica ettimde download gibi bir sey yok... hay anasini 1 script i bulamicam galiba...
 
W

webciyiz

Misafir
otur yaz ya :)

ben kendim yapcam diye bilmem biyerlerim catladı :)

php gani piyasada ama benm istediğim asp idi sonunda zar zor ıkına kakına yaptım :)
 

pembekedi

0
İyinet Üyesi
Katılım
3 Şubat 2005
Mesajlar
1,607
Reaction score
1
Konum
Neverland
Parse error: parse error, unexpected T_LOGICAL_AND on line 3

bu sorunu düzeltince de N/A gösteriyor PRi
 
W

webciyiz

Misafir
@holyboy ben istedim ama adam haklı emekle yazmıs istemen bişi değiştirmez...

isterseniz bende Future PR göstermeyen PHP si var MSN den atam isteyen olursa
 

Türkiye’nin ilk webmaster forum sitesi iyinet.com'da forum üyeleri tarafından yapılan tüm paylaşımlardan; Türk Ceza Kanunu’nun 20. Maddesinin, 5651 Sayılı Kanununun 4. maddesinin 2. fıkrasına göre, paylaşım yapan üyeler sorumludur.

Backlink ve Tanıtım Yazısı için iletişime geçmek için Skype Adresimiz: .cid.1580508955483fe5

seo ajansı , sosyal medya yönetimi
Üst