示例#1
0
 public static function host()
 {
     $host = isset($_SERVER['REMOTE_HOST']) ? $_SERVER['REMOTE_HOST'] : null;
     if (is_null($host) || $host == '') {
         $host = Oraculum_HTTP::ip();
     }
     return $host;
 }
示例#2
0
 public function RecordSession($redirect = FALSE)
 {
     if (!is_null($this->_key)) {
         $obj = $this->_register;
         foreach ($this->_fields as $field) {
             //if (property_exists(get_class($obj),$field)) {
             $user[$field] = Oraculum_Crypt::strcrypt($obj->{$field});
             //}
         }
         $user['ip'] = Oraculum_Crypt::strcrypt(Oraculum_HTTP::ip());
         $user['key'] = Oraculum_Crypt::strcrypt($this->_key);
         $user['user'] = Oraculum_Crypt::strcrypt($this->_user);
         Oraculum_Request::init_sess();
         Oraculum_Request::setsess($this->_sessname, $user);
         if ($redirect) {
             Oraculum_HTTP::redirect($this->_homeurl);
         }
         return true;
     } else {
         return false;
     }
 }
示例#3
0
文件: fs.php 项目: patrix/oraculum
function host()
{
    return Oraculum_HTTP::host();
}