key = 'E5A372F6-E38F-41A1-8A09-F5555F2B1ABA'; $this->host = 'http://geoapi2.gothello.ovh'; $this->curlManager = $curlManager; } public function find($ip){ $url = $this->host.'/api/'.$this->key.'/'.$ip; $headers = ['Content-type'=>'json','ssl'=>false]; $result = $this->curlManager->curl('GET', $url, [],$headers,[]); if($result === null){ $result = $this->curlManager->getCurlError(); } else { $result = new GeoIP($result); } return $result; } }