diff --git a/milfs/funciones/funciones.php b/milfs/funciones/funciones.php index add335e..626e4fb 100644 --- a/milfs/funciones/funciones.php +++ b/milfs/funciones/funciones.php @@ -4251,8 +4251,11 @@ function geocoder($valor,$campo){ $respuesta = new xajaxResponse('utf-8'); if(strlen($valor) > 3) { $valor = urlencode($valor); -$json = "https://nominatim.openstreetmap.org/search.php?format=json&limit=5&addressdetails=1&q=$valor"; +$json = "https://nominatim.openstreetmap.org/search.php?format=json&limit=5&addressdetails=1&q=$valor&email=info@tupale.co"; $data = file_get_contents("$json"); +if ($data=='429 Too Many Requests'){ +return $data; +} $geocoder = json_decode($data, true); if($data ==="[]") {$vacio="