private function ip() { if ($this->get_request_method() == "GET" && isset($this->_request['id'])) { $ip = new Ip((int) $this->_request['id']); if ($ip->fetch()) { $domxmldata = $ip->getDomXMLElement($this->domxml); $this->response($this->finishxml($domxmldata), 200); } else { $this->error_code = 1; $this->error_message = "IP not found"; $this->response($this->finishxml(), 404); } } }