<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Funzione che restituisce il pagerank]]></title><description><![CDATA[<p dir="auto">Ho trovato questo script <a href="http://www.tapouillo.com/firefox_extension/sourcecode.txt" rel="nofollow ugc">http://www.tapouillo.com/firefox_extension/sourcecode.txt</a>  ma non ho capito come si usa passando come parametro get url=<a href="http://www.google.it" rel="nofollow ugc">http://www.google.it</a>   mi restituisce   url:    <a href="http://www.google.it" rel="nofollow ugc">http://www.google.it</a> Checksum =2.0.114:    64249338711  manca poco mi sa ma come si ricava il numerino del PR? grazie <img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f642.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--slightly_smiling_face" style="height:1.4em;width:auto;vertical-align:middle" title=":)" alt="🙂" />  (il post ha problemi)</p>
]]></description><link>https://dev.connect.gt/topic/49063/funzione-che-restituisce-il-pagerank</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 05:02:49 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/49063.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 03 Oct 2007 13:45:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Funzione che restituisce il pagerank on Wed, 03 Oct 2007 18:58:56 GMT]]></title><description><![CDATA[<p dir="auto">no il nome nn influisce...hai un server locale?? se si provalo lì..perchè se ti funziona significa che cè qualcosa che nn va su Aruba...</p>
]]></description><link>https://dev.connect.gt/post/612164</link><guid isPermaLink="true">https://dev.connect.gt/post/612164</guid><dc:creator><![CDATA[supersavio]]></dc:creator><pubDate>Wed, 03 Oct 2007 18:58:56 GMT</pubDate></item><item><title><![CDATA[Reply to Funzione che restituisce il pagerank on Wed, 03 Oct 2007 17:08:58 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>SuperSavio</strong></p>
<p dir="auto">stranissimo...hai modificato qualcosa???</p>
</blockquote>
<p dir="auto">no non ho toccato neinte..il nome della pagina è pr invece di page_rank ma non credo che influisca<br />
sono su server aruba</p>
]]></description><link>https://dev.connect.gt/post/612169</link><guid isPermaLink="true">https://dev.connect.gt/post/612169</guid><dc:creator><![CDATA[marcio]]></dc:creator><pubDate>Wed, 03 Oct 2007 17:08:58 GMT</pubDate></item><item><title><![CDATA[Reply to Funzione che restituisce il pagerank on Wed, 03 Oct 2007 15:50:50 GMT]]></title><description><![CDATA[<p dir="auto">stranissimo...hai modificato qualcosa???</p>
]]></description><link>https://dev.connect.gt/post/612163</link><guid isPermaLink="true">https://dev.connect.gt/post/612163</guid><dc:creator><![CDATA[supersavio]]></dc:creator><pubDate>Wed, 03 Oct 2007 15:50:50 GMT</pubDate></item><item><title><![CDATA[Reply to Funzione che restituisce il pagerank on Wed, 03 Oct 2007 15:49:08 GMT]]></title><description><![CDATA[<p dir="auto">non mi funziona :bho:<br />
<a href="http://www.amicimsn.it/utility/page-rank-calculator/pr.php?url=www.supersavio.net" rel="nofollow ugc">http://www.amicimsn.it/utility/page-rank-calculator/pr.php?url=www.supersavio.net</a></p>
]]></description><link>https://dev.connect.gt/post/612166</link><guid isPermaLink="true">https://dev.connect.gt/post/612166</guid><dc:creator><![CDATA[marcio]]></dc:creator><pubDate>Wed, 03 Oct 2007 15:49:08 GMT</pubDate></item><item><title><![CDATA[Reply to Funzione che restituisce il pagerank on Wed, 03 Oct 2007 14:26:36 GMT]]></title><description><![CDATA[<p dir="auto">ti posto il codice che uso io...</p>
<pre><code class="language-php">&lt;?php
define('GOOGLE_MAGIC', 0xE6359A60);
class pageRank{
var $pr; 
 function zeroFill($a, $b){
 $z = hexdec(80000000);
  if ($z &amp; $a){
   $a = ($a&gt;&gt;1);
   $a &amp;= (~$z);
   $a |= 0x40000000;
   $a = ($a&gt;&gt;($b-1));
  }else{
   $a = ($a&gt;&gt;$b);
  }
 return $a;
 } 
 
 function mix($a,$b,$c) {
   $a -= $b; $a -= $c; $a ^= ($this-&gt;zeroFill($c,13));
   $b -= $c; $b -= $a; $b ^= ($a&lt;&lt;8);
   $c -= $a; $c -= $b; $c ^= ($this-&gt;zeroFill($b,13));
   $a -= $b; $a -= $c; $a ^= ($this-&gt;zeroFill($c,12));
   $b -= $c; $b -= $a; $b ^= ($a&lt;&lt;16);
   $c -= $a; $c -= $b; $c ^= ($this-&gt;zeroFill($b,5));
   $a -= $b; $a -= $c; $a ^= ($this-&gt;zeroFill($c,3));
   $b -= $c; $b -= $a; $b ^= ($a&lt;&lt;10);
   $c -= $a; $c -= $b; $c ^= ($this-&gt;zeroFill($b,15));
   return array($a,$b,$c);
 }
 
 function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) {
  if(is_null($length)) {
   $length = sizeof($url);
  }
  $a = $b = 0x9E3779B9;
  $c = $init;
  $k = 0;
  $len = $length;
  while($len &gt;= 12) {
   $a += ($url[$k+0] +($url[$k+1]&lt;&lt;8) +($url[$k+2]&lt;&lt;16) +($url[$k+3]&lt;&lt;24));
   $b += ($url[$k+4] +($url[$k+5]&lt;&lt;8) +($url[$k+6]&lt;&lt;16) +($url[$k+7]&lt;&lt;24));
   $c += ($url[$k+8] +($url[$k+9]&lt;&lt;8) +($url[$k+10]&lt;&lt;16)+($url[$k+11]&lt;&lt;24));
   $mix = $this-&gt;mix($a,$b,$c);
   $a = $mix[0]; $b = $mix[1]; $c = $mix[2];
   $k += 12;
   $len -= 12;
  }
  $c += $length;
  switch($len){
   case 11: $c+=($url[$k+10]&lt;&lt;24);
   case 10: $c+=($url[$k+9]&lt;&lt;16);
   case 9 : $c+=($url[$k+8]&lt;&lt;8);
   /* the first byte of c is reserved for the length */
   case 8 : $b+=($url[$k+7]&lt;&lt;24);
   case 7 : $b+=($url[$k+6]&lt;&lt;16);
   case 6 : $b+=($url[$k+5]&lt;&lt;8);
   case 5 : $b+=($url[$k+4]);
   case 4 : $a+=($url[$k+3]&lt;&lt;24);
   case 3 : $a+=($url[$k+2]&lt;&lt;16);
   case 2 : $a+=($url[$k+1]&lt;&lt;8);
   case 1 : $a+=($url[$k+0]);
  }
  $mix = $this-&gt;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&lt;strlen($string);$i++) {
   $result[$i] = ord($string{$i});
  }
 return $result;
 }
 
 function printrank($url){
  $ch = "6".$this-&gt;GoogleCH($this-&gt;strord("info:" . $url));
  
  $fp = fsockopen("www.google.com", 80, $errno, $errstr, 30);
  if (!$fp) {
     echo "$errstr ($errno)&lt;br /&gt;\n";
  } else {
     $out = "GET /search?client=navclient-auto&amp;ch=" . $ch .  "&amp;features=Rank&amp;q=info:" . $url . " HTTP/1.1\r\n" ;
     $out .= "Host: www.google.com\r\n" ;
     $out .= "Connection: Close\r\n\r\n" ; 
     fwrite($fp, $out);
     while (!feof($fp)) {
       $data = fgets($fp, 128);
       $pos = strpos($data, "Rank_");
         if($pos === false){
         }else{
           $pagerank = substr($data, $pos + 9);
           $this-&gt;pr_image($pagerank);
         }
     }
     fclose($fp);
  }
 }
//display pagerank image. Create your own or download E I made for this script. If you make your own make sure to call them pr0.gif, pr1.gif, pr2.gif etc.
 function pr_image($pagerank){
  if($pagerank == 0){
   $this-&gt;pr = "&lt;img src=\"images/0.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 0" ;
   }elseif($pagerank == 1){
   $this-&gt;pr = "&lt;img src=\"wnc/1.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 1" ;
   }elseif($pagerank == 2){
   $this-&gt;pr = "&lt;img src=\"wnc/2.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 2" ;
   }elseif($pagerank == 3){
   $this-&gt;pr = "&lt;img src=\"wnc/3.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 3" ;
   }elseif($pagerank == 4){
   $this-&gt;pr = "&lt;img src=\"wnc/4.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 4" ;
   }elseif($pagerank == 5){
   $this-&gt;pr = "&lt;img src=\"wnc/5.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 5" ;
   }elseif($pagerank == 6){
   $this-&gt;pr = "&lt;img src=\"wnc/6.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 6" ;
   }elseif($pagerank == 7){
   $this-&gt;pr = "&lt;img src=\"wnc/7.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 7" ;
   }elseif($pagerank == 8){
   $this-&gt;pr = "&lt;img src=\"wnc/8.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 8" ;
   }elseif($pagerank == 9){
   $this-&gt;pr = "&lt;img src=\"wnc/9.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 9" ;
   }else{
   $this-&gt;pr = "&lt;img src=\"wnc/10.png\" alt=\"PageRank " .$pagerank. " out of 10\"&gt; 10" ;
  }
 }
 function get_pr(){
  return $this-&gt;pr;
 }
}
$gpr = new pageRank();
$gpr-&gt;printrank("http://".$_GET['url']);
//display image
echo $gpr-&gt;get_pr();
?&gt;
</code></pre>
<p dir="auto">nel get basta che metti url senza http://</p>
<p dir="auto">page_rank.php?<a href="http://url=www.supersavio.net" rel="nofollow ugc">url=www.supersavio.net</a><br />
<img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=3abbd2034aa" class="not-responsive emoji emoji-android emoji--smile" style="height:1.4em;width:auto;vertical-align:middle" title=":D" alt="😄" /></p>
]]></description><link>https://dev.connect.gt/post/612162</link><guid isPermaLink="true">https://dev.connect.gt/post/612162</guid><dc:creator><![CDATA[supersavio]]></dc:creator><pubDate>Wed, 03 Oct 2007 14:26:36 GMT</pubDate></item></channel></rss>