Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Szukam skryptu page rank
eMatys
post
Post #1





Grupa: Zarejestrowani
Postów: 70
Pomógł: 0
Dołączył: 15.01.2006
Skąd: Poznań

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


na jednej ze stron znalazłem super program http://www.pagerank.empe3.net/check.php
problem w tym ze niewiem jak sie nazywa ten skrypt, pomógłby mi ktos odszukac go?

Ten post edytował eMatys 11.03.2006, 23:41:05
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 6)
sobstel
post
Post #2





Grupa: Zarejestrowani
Postów: 853
Pomógł: 25
Dołączył: 27.08.2003
Skąd: Katowice

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


mam nieodparte wrażenie, że na googlach dałoby się znaleźć bez problemu, ale że wstałem dzisiaj prawą nogą :

  1. <?php 
  2. // php Google PageRank Calculator Script 
  3. // -------------------------- April 2005 
  4. // Contact author: pagerankscript@googlecommunity.com 
  5.  
  6. // for updates, visit: 
  7. // http://www.googlecommunity.com/scripts/google-pagerank.php 
  8.  
  9. // provided by www.GoogleCommunity.com 
  10. // an unofficial community of Google fans 
  11. // --------------------------------------- 
  12.  
  13. // Instructions 
  14. // Upload pagerank.php to your server 
  15. // Call it like this: http://www.example.com/pagerank.php?url=http://www.yahoo.com/ 
  16. //  example.com is your website. yahoo.com is the website to get the PR of 
  17. // The code below displays the PR for $url 
  18.  
  19. /* 
  20. This code is released unto the public domain 
  21. */ 
  22. //header("Content-Type: text/plain; charset=utf-8"); 
  23. define('GOOGLE_MAGIC', 0xE6359A60); 
  24.  
  25. //unsigned shift right 
  26. function zeroFill($a, $b) 
  27. { 
  28. $z = hexdec(80000000); 
  29. if ($z & $a) 
  30. { 
  31. $a = ($a>>1); 
  32. $a &= (~$z); 
  33. $a |= 0x40000000; 
  34. $a = ($a>>($b-1)); 
  35. } 
  36. else 
  37. { 
  38. $a = ($a>>$b); 
  39. } 
  40. return $a; 
  41. } 
  42.  
  43. function mix($a,$b,$c) { 
  44. $a -= $b; $a -= $c; $a ^= (zeroFill($c,13)); 
  45. $b -= $c; $b -= $a; $b ^= ($a<<8); 
  46. $c -= $a; $c -= $b; $c ^= (zeroFill($b,13)); 
  47. $a -= $b; $a -= $c; $a ^= (zeroFill($c,12)); 
  48. $b -= $c; $b -= $a; $b ^= ($a<<16); 
  49. $c -= $a; $c -= $b; $c ^= (zeroFill($b,5)); 
  50. $a -= $b; $a -= $c; $a ^= (zeroFill($c,3));
  51. $b -= $c; $b -= $a; $b ^= ($a<<10); 
  52. $c -= $a; $c -= $b; $c ^= (zeroFill($b,15)); 
  53.  
  54. return array($a,$b,$c); 
  55. } 
  56.  
  57. function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) { 
  58. if(is_null($length)) { 
  59. $length = sizeof($url); 
  60. } 
  61. $a = $b = 0x9E3779B9; 
  62. $c = $init; 
  63. $k = 0; 
  64. $len = $length; 
  65. while($len >= 12) { 
  66. $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24)); 
  67. $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24)); 
  68. $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24)); 
  69. $mix = mix($a,$b,$c); 
  70. $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; 
  71. $k += 12; 
  72. $len -= 12; 
  73. } 
  74.  
  75. $c += $length; 
  76. switch($len) /* all the case statements fall through */ 
  77. { 
  78. case 11: $c+=($url[$k+10]<<24); 
  79. case 10: $c+=($url[$k+9]<<16); 
  80. case 9 : $c+=($url[$k+8]<<8); 
  81. /* the first byte of c is reserved for the length */ 
  82. case 8 : $b+=($url[$k+7]<<24); 
  83. case 7 : $b+=($url[$k+6]<<16); 
  84. case 6 : $b+=($url[$k+5]<<8); 
  85. case 5 : $b+=($url[$k+4]); 
  86. case 4 : $a+=($url[$k+3]<<24); 
  87. case 3 : $a+=($url[$k+2]<<16); 
  88. case 2 : $a+=($url[$k+1]<<8); 
  89. case 1 : $a+=($url[$k+0]); 
  90.  /* case 0: nothing left to add */ 
  91. } 
  92. $mix = mix($a,$b,$c); 
  93. /*-------------------------------------------- report the result */ 
  94. return $mix[2]; 
  95. } 
  96.  
  97. //converts a string into an array of integers containing the numeric value of the 
    char 
  98. function strord($string) { 
  99. for($i=0;$i<strlen($string);$i++) { 
  100. $result[$i] = ord($string{$i}); 
  101. } 
  102. return $result; 
  103. } 
  104.  
  105. function getrank($url) { 
  106. $url = 'info:'.$url; 
  107. $ch = GoogleCH(strord($url)); 
  108. $file = "http://www.google.com/search?client=navclient-auto&ch=6$ch&features=Rank&q=$url"; 
  109. $data = file($file); 
  110. $rankarray = explode (':', $data[2]); 
  111. $rank = $rankarray[2]; 
  112. return $rank; 
  113. } 
  114.  
  115. echo 'PageRank: '.getrank($_REQUEST["REQUEST_URI"]).'<br /><small>provided by <a href="http://www.googlecommunity.com/" target="_blank">Google Community.com</a></small>'; 
  116.  
  117. ?>
Go to the top of the page
+Quote Post
eMatys
post
Post #3





Grupa: Zarejestrowani
Postów: 70
Pomógł: 0
Dołączył: 15.01.2006
Skąd: Poznań

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


No tak nie do końca, poszukuje skryptu który pozwalałbym wygenerować obrazek z wartością pagerank tak by ktoś mógł sobie sprawdzić za pośrednictwem mojej strony. Dzięki temu ktoś bedzie mógł sprawdzić swój pagerank a ja bede zwiekszał swój. Kolejnym przykładem może być strona: http://www.dodaj.pl/pr_meter.php choć rozwiązanie z js mi się bardziej podoba.

Fakt znalazłem kilka programów w googlach sprawdzający pagerank, ale zaden nie sprostał moim oczekiwaniom. Dlatego zwracam się ponownie z prośba o pomoc.
Go to the top of the page
+Quote Post
d3mon
post
Post #4





Grupa: Zarejestrowani
Postów: 2
Pomógł: 0
Dołączył: 7.03.2006

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


nie ma gotowego skryptu, sam szukalem przez kilka dni.. musisz sobie sam napisac (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
podpowiem ci ze jako wynik musisz dac:
  1. <?php
  2.  
  3. header("Content-type: image/PNG");
  4. $obrazek = ImageCreateFromPng("_nazwapliku.png_");
  5. ImagePng($obrazek);
  6. ImageDestroy($obrazek);
  7.  
  8. ?>

PS.
Mi sie udalo www.d3mon.jx.pl/pagerank

Ten post edytował d3mon 13.03.2006, 12:23:26
Go to the top of the page
+Quote Post
jj09
post
Post #5





Grupa: Zarejestrowani
Postów: 63
Pomógł: 0
Dołączył: 20.12.2004
Skąd: Wrocław / Jelenia Góra

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


Cytat(sopel @ 12.03.2006, 09:05:57 ) *
mam nieodparte wrażenie, że na googlach dałoby się znaleźć bez problemu, ale że wstałem dzisiaj prawą nogą :

  1. <?php 
  2. // php Google PageRank Calculator Script 
  3. // -------------------------- April 2005 
  4. // Contact author: pagerankscript@googlecommunity.com 
  5.  
  6. // for updates, visit: 
  7. // <a href=\"http://www.googlecommunity.com/scripts/google-pagerank.php\" target=\"_blank\">http://www.googlecommunity.com/scripts/google-pagerank.php</a> 
  8.  
  9. // provided by www.GoogleCommunity.com 
  10. // an unofficial community of Google fans 
  11. // --------------------------------------- 
  12.  
  13. // Instructions 
  14. // Upload pagerank.php to your server 
  15. // Call it like this: <a href=\"http://www.example.com/pagerank.php?url=http://www.yahoo.com/\" target=\"_blank\">http://www.example.com/pagerank.php?url=ht.../www.yahoo.com/</a> 
  16. //  example.com is your website. yahoo.com is the website to get the PR of 
  17. // The code below displays the PR for $url 
  18.  
  19. /* 
  20. This code is released unto the public domain 
  21. */ 
  22. //header("Content-Type: text/plain; charset=utf-8"); 
  23. define('GOOGLE_MAGIC', 0xE6359A60); 
  24.  
  25. //unsigned shift right 
  26. function zeroFill($a, $b) 
  27. { 
  28. $z = hexdec(80000000); 
  29. if ($z & $a) 
  30. { 
  31. $a = ($a>>1); 
  32. $a &= (~$z); 
  33. $a |= 0x40000000; 
  34. $a = ($a>>($b-1)); 
  35. } 
  36. else 
  37. { 
  38. $a = ($a>>$b); 
  39. } 
  40. return $a; 
  41. } 
  42.  
  43. function mix($a,$b,$c) { 
  44. $a -= $b; $a -= $c; $a ^= (zeroFill($c,13)); 
  45. $b -= $c; $b -= $a; $b ^= ($a<<8); 
  46. $c -= $a; $c -= $b; $c ^= (zeroFill($b,13)); 
  47. $a -= $b; $a -= $c; $a ^= (zeroFill($c,12)); 
  48. $b -= $c; $b -= $a; $b ^= ($a<<16); 
  49. $c -= $a; $c -= $b; $c ^= (zeroFill($b,5)); 
  50. $a -= $b; $a -= $c; $a ^= (zeroFill($c,3));
  51. $b -= $c; $b -= $a; $b ^= ($a<<10); 
  52. $c -= $a; $c -= $b; $c ^= (zeroFill($b,15)); 
  53.  
  54. return array($a,$b,$c); 
  55. } 
  56.  
  57. function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) { 
  58. if(is_null($length)) { 
  59. $length = sizeof($url); 
  60. } 
  61. $a = $b = 0x9E3779B9; 
  62. $c = $init; 
  63. $k = 0; 
  64. $len = $length; 
  65. while($len >= 12) { 
  66. $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24)); 
  67. $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24)); 
  68. $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24)); 
  69. $mix = mix($a,$b,$c); 
  70. $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; 
  71. $k += 12; 
  72. $len -= 12; 
  73. } 
  74.  
  75. $c += $length; 
  76. switch($len) /* all the case statements fall through */ 
  77. { 
  78. case 11: $c+=($url[$k+10]<<24); 
  79. case 10: $c+=($url[$k+9]<<16); 
  80. case 9 : $c+=($url[$k+8]<<8); 
  81. /* the first byte of c is reserved for the length */ 
  82. case 8 : $b+=($url[$k+7]<<24); 
  83. case 7 : $b+=($url[$k+6]<<16); 
  84. case 6 : $b+=($url[$k+5]<<8); 
  85. case 5 : $b+=($url[$k+4]); 
  86. case 4 : $a+=($url[$k+3]<<24); 
  87. case 3 : $a+=($url[$k+2]<<16); 
  88. case 2 : $a+=($url[$k+1]<<8); 
  89. case 1 : $a+=($url[$k+0]); 
  90.  /* case 0: nothing left to add */ 
  91. } 
  92. $mix = mix($a,$b,$c); 
  93. /*-------------------------------------------- report the result */ 
  94. return $mix[2]; 
  95. } 
  96.  
  97. //converts a string into an array of integers containing the numeric value of the 
    char 
  98. function strord($string) { 
  99. for($i=0;$i<strlen($string);$i++) { 
  100. $result[$i] = ord($string{$i}); 
  101. } 
  102. return $result; 
  103. } 
  104.  
  105. function getrank($url) { 
  106. $url = 'info:'.$url; 
  107. $ch = GoogleCH(strord($url)); 
  108. $file = "http://www.google.com/search?client=navclient-auto&ch=6$ch&features=Rank&q=$url"; 
  109. $data = file($file); 
  110. $rankarray = explode (':', $data[2]); 
  111. $rank = $rankarray[2]; 
  112. return $rank; 
  113. } 
  114.  
  115. echo 'PageRank: '.getrank($_REQUEST["REQUEST_URI"]).'<br /><small>provided by <a href="http://www.googlecommunity.com/" target="_blank">Google Community.com</a></small>'; 
  116.  
  117. ?>

wstawiłem do siebie i mi pokazuje coś takiego:
Cytat
Warning: file(http://www.google.com/search?client=navclient-auto&ch=61054125718&features=Rank&q=info:) [function.file]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in /home/dsj/domains/dsj-online.pl/public_html/pagerank.php on line 109
PageRank:
provided by Google Community.com
Go to the top of the page
+Quote Post
f1xer
post
Post #6





Grupa: Zarejestrowani
Postów: 403
Pomógł: 68
Dołączył: 20.03.2008

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


Ogólnie to google udostępniło klasę do sprawdzania wartości PageRank odsyłam do tego artykułu
Go to the top of the page
+Quote Post
gryzly123
post
Post #7





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 10.07.2008
Skąd: W trzecim wymiarze :P

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


jest taka strona 4free.pl zajrzyj, tam jest to o co ci chodzi oraz tworzenie sond i wiele więcej.
to chyba prostrze od pisania własnego skryptu (IMG:http://forum.php.pl/style_emoticons/default/laugh.gif)
Go to the top of the page
+Quote Post

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: 23.08.2025 - 11:02