public function get($url, $data = array()) { if (count($data) > 0) { $this->setopt(CURLOPT_URL, $url . '?' . http_build_query($data)); } else { $this->setopt(CURLOPT_URL, $url); } $this->setopt(CURLOPT_HTTPGET, true); $this->_exec(); }