Kostenloses Webkatalog Script - Link Script

 
  Download Webkatalog Script   Demo Webkatalog   Demo Adminbereich   PHP & Mysql   Impressum  
 
Home » Forum
Benutzername:

Passwort:




Einbindungsbeispiel Surftipps & Linkpartner
Webkatalog und Partner Seiten

<?
/* Beispiel zum Einbinden */
define('CG_LINK', true);
@include (
'url-anmelden-link-eintragen
/cg_config.php'
);
/*
Varibale $linkswebkat in *.php einbinden
<? echo $linkswebkat; ?>
Erzeugte Ausgabe:
Surftipps & Linkpartner
Webkatalog und Partner Seiten
*/
?>

#1 2007-01-15 12:59:10

siteadmin
Administrator
Registriert: 2007-01-12
Beiträge: 26

PHP Google-Page-Rank-Script

PHP Google-Page-Rank-Script

Das Script dient der Demonstration, wie der PR ohne die Verwendung der Toolbar abgefragt werden kann.
Das automatisierte Abfragen des PageRank™ ohne Toolbar bedarf der vorherigen Genehmigung von Google.

Code:

  1. <?php
  2. define('GMAG', 0xE6359A60);
  3.  
  4. //unsigned shift right
  5. function zeroFill($a, $b)
  6. {
  7.     $z = hexdec(80000000);
  8.         if ($z & $a)
  9.         {
  10.             $a = ($a>>1);
  11.             $a &= (~$z);
  12.             $a |= 0x40000000;
  13.             $a = ($a>>($b-1));
  14.         }
  15.         else
  16.         {
  17.             $a = ($a>>$b);
  18.         }
  19.         return $a;
  20. }
  21.  
  22.  
  23. function mix($a,$b,$c) {
  24.   $a -= $b; $a -= $c; $a ^= (zeroFill($c,13));
  25.   $b -= $c; $b -= $a; $b ^= ($a<<8);
  26.   $c -= $a; $c -= $b; $c ^= (zeroFill($b,13));
  27.   $a -= $b; $a -= $c; $a ^= (zeroFill($c,12));
  28.   $b -= $c; $b -= $a; $b ^= ($a<<16);
  29.   $c -= $a; $c -= $b; $c ^= (zeroFill($b,5));
  30.   $a -= $b; $a -= $c; $a ^= (zeroFill($c,3));
  31.   $b -= $c; $b -= $a; $b ^= ($a<<10);
  32.   $c -= $a; $c -= $b; $c ^= (zeroFill($b,15));
  33.  
  34.   return array($a,$b,$c);
  35. }
  36.  
  37. function GCH($url, $length=null, $init=GMAG) {
  38.     if(is_null($length)) {
  39.         $length = sizeof($url);
  40.     }
  41.     $a = $b = 0x9E3779B9;
  42.     $c = $init;
  43.     $k = 0;
  44.     $len = $length;
  45.     while($len >= 12) {
  46.         $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24));
  47.         $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24));
  48.         $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24));
  49.         $mix = mix($a,$b,$c);
  50.         $a = $mix[0]; $b = $mix[1]; $c = $mix[2];
  51.         $k += 12;
  52.         $len -= 12;
  53.     }
  54.  
  55.     $c += $length;
  56.     switch($len)              /* all the case statements fall through */
  57.     {
  58.         case 11: $c+=($url[$k+10]<<24);
  59.         case 10: $c+=($url[$k+9]<<16);
  60.         case 9 : $c+=($url[$k+8]<<8);
  61.           /* the first byte of c is reserved for the length */
  62.         case 8 : $b+=($url[$k+7]<<24);
  63.         case 7 : $b+=($url[$k+6]<<16);
  64.         case 6 : $b+=($url[$k+5]<<8);
  65.         case 5 : $b+=($url[$k+4]);
  66.         case 4 : $a+=($url[$k+3]<<24);
  67.         case 3 : $a+=($url[$k+2]<<16);
  68.         case 2 : $a+=($url[$k+1]<<8);
  69.         case 1 : $a+=($url[$k+0]);
  70.          /* case 0: nothing left to add */
  71.     }
  72.     $mix = mix($a,$b,$c);
  73.     /*-------------------------------------------- report the result */
  74.     return $mix[2];
  75. }
  76.  
  77. //converts a string into an array of integers containing the numeric value of the char
  78. function strord($string) {
  79.     for($i=0;$i<strlen($string);$i++) {
  80.         $result[$i] = ord($string{$i});
  81.     }
  82.     return $result;
  83. }
  84.  
  85. function getPR($_url) {
  86.     $url = 'info:'.$_url;
  87.     $ch = GCH(strord($url));
  88.     $url='info:'.urlencode($_url);
  89.     $pr = file("http://www.google.com/search?client=navclient-auto&ch=6$ch&ie=UTF-8&oe=UTF-8&features=Rank&q=$url");
  90.     $pr_str = implode("", $pr);
  91.     return substr($pr_str,strrpos($pr_str, ":")+1);
  92. }
  93.  
  94.  
  95. echo "Der PR Ihrer Seite ist: ".getPR("http://www.yahoo.com");
  96.  
  97. ?>

Offline

 

#2 2008-04-08 19:48:26

michael1980
neues mitglied
Registriert: 2008-04-08
Beiträge: 2

Re: PHP Google-Page-Rank-Script

nice wo haste den code her? smile ?big_smile

Offline

 

#3 2008-12-15 02:56:43

entzückende Dame
neues mitglied
Registriert: 2008-12-13
Beiträge: 3

Re: PHP Google-Page-Rank-Script

Nizza-Codes zu gemeinsamen here.I 'll versuchen, mehr über die Studie, um zu sehen, wie kann ich ihn nutzen properly.I glaube, ich möchte darum bitten, ein zu dieser Hilfe.

Offline

 

Brett Fußzeile

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson