diff --git a/ip2locationlite.class.php b/ip2locationlite.class.php index 7ea2f2f..f04b0dd 100644 --- a/ip2locationlite.class.php +++ b/ip2locationlite.class.php @@ -1,4 +1,6 @@ service . '/' . $this->version . '/' . $name . '/?key=' . $this->apiKey . '&ip=' . $ip . '&format=xml'); + $url = 'http://' . $this->service . '/' . $this->version . '/' . $name . '/?key=' . $this->apiKey . '&ip=' . $ip . '&format=xml'; + $ch =curl_init($url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + $xml = curl_exec($ch); + curl_close($ch); + //$xml = @file_get_contents('http://' . $this->service . '/' . $this->version . '/' . $name . '/?key=' . $this->apiKey . '&ip=' . $ip . '&format=xml'); if (get_magic_quotes_runtime()){