public function init()
    {
        $this->data['host']     = (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '');
        $this->data['script']   = (isset($_SERVER['SCRIPT_NAME']) ? $_SERVER['SCRIPT_NAME'] : '');
        $this->data['uri']      = (isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '');
        $this->data['query']    = (isset($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : '');
        $this->data['name']     = (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : '');
        $this->data['referer']  = (isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : '');
        $this->data['protocol'] = (isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0');
        $this->data['scheme']   = (isset($_SERVER['HTTPS']) ? 'https://' : 'Http://');
        $this->data['is_post']  = (isset($_SERVER['REQUEST_METHOD']) ? 'POST' == $_SERVER['REQUEST_METHOD'] : false);
        $this->data['is_get']   = (isset($_SERVER['REQUEST_METHOD']) ? 'GET' == $_SERVER['REQUEST_METHOD'] : false);
        $this->data['is_ajax']  = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) ? true : false);

        if (isset($_SERVER['REMOTE_ADDR'])) {
            $this->data['ip'] = $_SERVER['REMOTE_ADDR'];
        } else {
            $this->data['ip'] = 'localhost';
        }
    }