Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> PageRank ?
Bartol
post
Post #1





Grupa: Zarejestrowani
Postów: 17
Pomógł: 0
Dołączył: 7.08.2004
Skąd: Tomaszów Maz.

Ostrzeżenie: (0%)
-----


Czy wie ktos moze jak sprawdzic PageRank strony uzywajac do tego php ? Szukalem na forum, niestety nic o tym nie ma (IMG:http://forum.php.pl/style_emoticons/default/sad.gif) Z gory dzieki za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
nediam
post
Post #2





Grupa: Zarejestrowani
Postów: 29
Pomógł: 0
Dołączył: 30.01.2004

Ostrzeżenie: (0%)
-----


Checksum:

  1. <?php 
  2. /* 
  3. Written and contributed by 
  4. Alex Stapleton, 
  5. Andy Doctorow, 
  6. Tarakan, 
  7. Bill Zeller, 
  8. Vijay \"Cyberax\" Bhatter 
  9. traB 
  10. This code is released into the public domain 
  11. */ 
  12. define('GOOGLE_MAGIC', 0xE6359A60); 
  13.  
  14. //unsigned shift right 
  15. function zeroFill($a, $b) 
  16. { 
  17. $z = hexdec(80000000); 
  18. if ($z & $a) 
  19. { 
  20. $a = ($a>>1); 
  21. $a &= (~$z); 
  22. $a |= 0x40000000; 
  23. $a = ($a>>($b-1)); 
  24. } 
  25. else 
  26. { 
  27. $a = ($a>>$b); 
  28. } 
  29. return $a; 
  30. } 
  31.  
  32.  
  33. function mix($a,$b,$c) { 
  34. $a -= $b; $a -= $c; $a ^= (zeroFill($c,13)); 
  35. $b -= $c; $b -= $a; $b ^= ($a<<8); 
  36. $c -= $a; $c -= $b; $c ^= (zeroFill($b,13)); 
  37. $a -= $b; $a -= $c; $a ^= (zeroFill($c,12)); 
  38. $b -= $c; $b -= $a; $b ^= ($a<<16); 
  39. $c -= $a; $c -= $b; $c ^= (zeroFill($b,5)); 
  40. $a -= $b; $a -= $c; $a ^= (zeroFill($c,3));  
  41. $b -= $c; $b -= $a; $b ^= ($a<<10); 
  42. $c -= $a; $c -= $b; $c ^= (zeroFill($b,15)); 
  43.  
  44. return array($a,$b,$c); 
  45. } 
  46.  
  47. function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) { 
  48. if(is_null($length)) { 
  49. $length = sizeof($url); 
  50. } 
  51. $a = $b = 0x9E3779B9; 
  52. $c = $init; 
  53. $k = 0; 
  54. $len = $length; 
  55. while($len >= 12) { 
  56. $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24)); 
  57. $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24)); 
  58. $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24)); 
  59. $mix = mix($a,$b,$c); 
  60. $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; 
  61. $k += 12; 
  62. $len -= 12; 
  63. } 
  64.  
  65. $c += $length; 
  66. switch($len) /* all the case statements fall through */ 
  67. { 
  68. case 11: $c+=($url[$k+10]<<24); 
  69. case 10: $c+=($url[$k+9]<<16); 
  70. case 9 : $c+=($url[$k+8]<<8); 
  71. /* the first byte of c is reserved for the length */ 
  72. case 8 : $b+=($url[$k+7]<<24); 
  73. case 7 : $b+=($url[$k+6]<<16); 
  74. case 6 : $b+=($url[$k+5]<<8); 
  75. case 5 : $b+=($url[$k+4]); 
  76. case 4 : $a+=($url[$k+3]<<24); 
  77. case 3 : $a+=($url[$k+2]<<16); 
  78. case 2 : $a+=($url[$k+1]<<8); 
  79. case 1 : $a+=($url[$k+0]); 
  80.  /* case 0: nothing left to add */ 
  81. } 
  82. $mix = mix($a,$b,$c); 
  83. /*-------------------------------------------- report the result */ 
  84. return $mix[2]; 
  85. } 
  86.  
  87. //converts a string into an array of integers containing the numeric value of the 
  88. har 
  89. function strord($string) { 
  90. for($i=0;$i<strlen($string);$i++) { 
  91. $result[$i] = ord($string{$i}); 
  92. } 
  93. return $result; 
  94. } 
  95.  
  96.  
  97. // converts an array of 32 bit integers into an array with 8 bit values. Equivalen
  98.  to (BYTE *)arr32 
  99.  
  100. function c32to8bit($arr32) { 
  101. for($i=0;$i<count($arr32);$i++) { 
  102. for ($bitOrder=$i*4;$bitOrder<=$i*4+3;$bitOrder++) { 
  103. $arr8[$bitOrder]=$arr32[$i]&255; 
  104. $arr32[$i]=zeroFill($arr32[$i], 8); 
  105. }  
  106. } 
  107. return $arr8; 
  108. } 
  109.  
  110.  
  111. // http://www.example.com/ - Checksum: 6540747202 
  112. $url = 'info:'.$_GET['url']; 
  113. print(&#092;"url:t{$_GET['url']}n\"); 
  114. $ch = GoogleCH(strord($url)); 
  115. printf(&#092;"Checksum <2.0.114:t6%un\",$ch); 
  116.  
  117. $ch=sprintf(&#092;"%u\", $ch); 
  118. // new since Toolbar 2.0.114 
  119.  
  120. $ch = ((($ch/7) << 2) | (((int)fmod($ch,13))&7)); 
  121.  
  122. $prbuf = array(); 
  123. $prbuf[0] = $ch; 
  124. for($i = 1; $i < 20; $i++) { 
  125. $prbuf[$i] = $prbuf[$i-1]-9; 
  126. } 
  127. $ch = GoogleCH(c32to8bit($prbuf), 80); 
  128. // 
  129.  
  130. printf(&#092;"Checksum >=2.0.114:t6%un\",$ch); 
  131.  
  132. $check = sprintf(&#092;"6%u\", $ch);
  133. ?>



Dzialanie:

http://www.google.com/search?client=navclient-auto&ch=[CHECKSUM]&features=Rank&q=info:[ADRES STRONY]
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 8.10.2025 - 18:16