PR yi kontrol edip Db ye kaydedicek kod

  • Konbuyu başlatan dnturkey
  • Başlangıç tarihi
D
dnturkey
Misafir
biliyorum çok şey istiyor olucam ama yinede şansımı deniyim belki bi yardımsever çıkar:) sorum şu

----------------------------
"site" tablosundaki "url" alanında bulunan adresin PR sini kontrol edip aynı tablonun "pr" alanına yazdıracak.

aynı şekilde indexlenmiş sayfa sayısını ve backlink sayısını kontrol edip sırayla "ip" ve "bl" alanlarına yazdıracak kod."
------------------------------

ben yardımcı olacak arkadaşa yardımcı olması için

"indexlenmiş sayfa sayısını"
$source = 'http://www.google.com/search?hl=en&lr=&q=site%3A'.$url.'&btnG=Search';

"backlink sayısını"
$source2 = 'http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A'.$url;

"PR"
"http://www.google.com/search?client=navclient-auto&ch=6$ch&features=Rank&q=$url";

PR linki snırım çalışmıyor ama başkada bulamadım.
ben PR-IP ve BL yi kontrol edecekleri url leri buldum sadece koda uyarlanması lazım sanırım.

şimdiden çok teşekkür ederim.
 
Root
Root
İyinet Ekibi
Onaylı Üye
Katılım
2 Eylül 2002
Mesajlar
5,043
Tepki puanı
79
Konum
SEO
Bu kodlar bazi ucretsiz php script sitelerinde veya php forumlarinda mevcut. Tam nerede bilemiyorum, google da bir aram yaaprsan bulursun sanirim.
 
D
dnturkey
Misafir
iyinetadmin' Alıntı:
Bu kodlar bazi ucretsiz php script sitelerinde veya php forumlarinda mevcut. Tam nerede bilemiyorum, google da bir aram yaaprsan bulursun sanirim.

yok zaten o kodlar bizim elimizde var.

ama onları kontrol edip db ye yazdırcak kod ile birleştiremiyoruz
 
Root
Root
İyinet Ekibi
Onaylı Üye
Katılım
2 Eylül 2002
Mesajlar
5,043
Tepki puanı
79
Konum
SEO
dnturkey' Alıntı:
yok zaten o kodlar bizim elimizde var.

ama onları kontrol edip db ye yazdırcak kod ile birleştiremiyoruz

Siz o kodlari zipleyip buraya koyun, yardim eden cikacaktir...
 
D
dnturkey
Misafir
PHP:
<?

include ("**********");







$sql="select * from $******* where id='$id'"; 

$sorgu=mysql_query("$sql");



while ($sonuc=mysql_fetch_array($sorgu)){





echo"$sonuc[url]";



$url=$sonuc[url];





}







//////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////



/* 

    This code is released unto the public domain 

*/ 

//header("Content-Type: text/plain; charset=utf-8"); 

define('GOOGLE_MAGIC', 0xE6359A60); 



//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 ^= (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=lisanssız, $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)              /* 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 = 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;$i<strlen($string);$i++) { 

        $result[$i] = ord($string{$i}); 

    } 

    return $result; 

} 



function getrank($url) { 

    $url = 'info:'.$url; 

    $ch = GoogleCH(strord($url)); 

    $file = "http://www.google.com/search?client=navclient-auto&ch=6$ch&features=Rank&q=$url"; 

    $data = file($file); 

    $rankarray = explode (':', $data[2]); 

    $rank = $rankarray[2]; 

    return $rank; 

} 





$pr=''.getrank($_REQUEST["url"]).'';



 









//////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////





//////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////













function fetch($source, $start, $smlen, $stop, $fail) {

	$data = @implode('', @file($source));

	$data = strip_tags($data);

	$data = strtolower($data);

	$data = str_replace("\n", '', $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);

	}

}



if($url) {

	$data = array();

	

	$url = trim(eregi_replace('http://', '', $url)); 

	

	// check Google

	$source = 'http://www.google.com/search?hl=en&lr=&q=site%3A'.$url.'&btnG=Search';

	$data['Google'] = array(fetch($source, 'of about', 9, 'from', 'did not match any documents'), $source);

	

}



if($data) {

		

		foreach($data as $engine => $result) {

			$total += ereg_replace("[[:punct:]]", '', $result[0]);

		}}

















//////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////







//////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////









$url2=$url;



function fetch2($source2, $start2, $smlen2, $stop2, $fail2) {

	$data2 = @implode('', @file($source2));

	$data2 = strip_tags($data2);

	$data2 = strtolower($data2);

	$data2 = str_replace("\n", '', $data2);

	$data2 = str_replace("\r", '', $data2);

	

	if(substr_count($data2, $fail2)) {

		return 0;

	} else {

		$data2 = substr($data2, strpos($data2, $start2)+$smlen2);

		$data2 = substr($data2, 0, strpos($data2, $stop2));

		return trim($data2);

	}

}



if($url2) {

	$data2 = array();

	

	$url2 = trim(eregi_replace('http://', '', $url)); 

	

	// check Google

	$source2 = 'http://www.google.com/search?hl=en&lr=&ie=UTF-8&q=link%3A'.$url2;

	$data2['Google'] = array(fetch2($source2, 'of about', 9, 'linking', 'did not match any documents'), $source2);

}

?>



	<?php

	// display data2 summary

	if($data2) {

		



		foreach($data2 as $engine => $result) {

			

			if($result[0])

					

			

			$total2 += ereg_replace("[[:punct:]]", '', $result[0]);

		}

		

		

	}

		





if(!$total2)

{



$total2=0;

}





if(!$total)

{



$total=0;

}





if(!$pr)

{



$pr=0;

}





//////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////////////////////////













$sql="update $******* set pr='$pr', ip='$total' , bl='$total2' where id='$id'"; 

mysql_query("$sql");



echo"<br>PR: $pr<br>İndex Pages: $total<br>Back Link: $total2";





?>
 
Geri
Üst