Esempio n. 1
0
 /**
  * Get a hash of your server
  *
  * If you happen to have multiple installations of frapi
  * you would get apc cache collisions if we woulnd't have
  * some sort of hashing and identification of the hostnames.
  *
  * Right now this hash is very rudimentary, it's simply and sha1
  * hash of the HTTP_HOST that you are serving frapi from.
  *
  * @return string self::$_hash The sha1-server hash
  */
 public static function getHash()
 {
     if (self::$_hash) {
         return self::$_hash;
     }
     $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
     self::$_hash = hash('sha1', $host);
     return self::$_hash;
 }