|
@@ -11,16 +11,16 @@ |
|
|
block discarded – undo |
|
11
|
11
|
$getJson = new Curl; |
|
12
|
12
|
$test = $validateIP->validate($ipNumber); |
|
13
|
13
|
if ($test[0]) { |
|
14
|
|
- $location = $getJson->cUrl($ipstack["url"]. $ipNumber. '?access_key='. $ipstack["key"]); |
|
|
14
|
+ $location = $getJson->cUrl($ipstack["url"].$ipNumber.'?access_key='.$ipstack["key"]); |
|
15
|
15
|
$location = json_decode($location, true); |
|
16
|
16
|
$latitude = $location["latitude"]; |
|
17
|
17
|
$longitude = $location["longitude"]; |
|
18
|
18
|
$location = array("city"=> $location["city"], "latitude"=> $latitude, "longitude"=> $longitude); |
|
19
|
19
|
} else { |
|
20
|
|
- $search = array('å','ä','ö'); |
|
21
|
|
- $replace = array('a','a','o'); |
|
|
20
|
+ $search = array('å', 'ä', 'ö'); |
|
|
21
|
+ $replace = array('a', 'a', 'o'); |
|
22
|
22
|
$ipNumber = str_replace($search, $replace, $ipNumber); |
|
23
|
|
- $location = $getJson->cUrl($mapquest["url"]. $mapquest["key"]. $mapquest["extra"]. $ipNumber); |
|
|
23
|
+ $location = $getJson->cUrl($mapquest["url"].$mapquest["key"].$mapquest["extra"].$ipNumber); |
|
24
|
24
|
$location = json_decode($location, true); |
|
25
|
25
|
$latitude = $location["results"][0]["locations"][0]["latLng"]["lat"]; |
|
26
|
26
|
$longitude = $location["results"][0]["locations"][0]["latLng"]["lng"]; |
Please login to merge, or discard this patch.