extreme-ip-lookup.com is a free lookup service that does not require an api key.'; } /** * Get the URL to fetch data from. */ protected function getUrl(): string { $auth = !empty($this->auth) ? '?key='.$this->auth : ''; return 'https://extreme-ip-lookup.com/json/'.$this->ip.$auth; } protected function parseResponse($response) { $data = json_decode($response, true); if ($data) { foreach ($data as $key => $value) { switch ($key) { case 'region': $key = 'region'; break; case 'country': $key = 'country'; break; case 'city': $key = 'city'; break; case 'businessName': $key = 'organization'; break; } $this->$key = $value; } } } }