Код: Выделить всё
$addr = 'Brasília/DF, Brasil';
$url = 'https://nominatim.openstreetmap.org/search?q='.str_replace(' ','+',$addr).'&format=jsonv2&polygon=0&addressdetails=0';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headers = [
'Accept: text/html,application/xhtml+xml,application/xml',
'Accept-Language: en-US,en,pt-BR',
'Content-Type: text/html;charset=utf-8',
'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0',
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$server_output = curl_exec($ch);
curl_close($ch);
var_export($server_output);
Также пробовал использовать функции R download.file и geocode_OSM, та же проблема.
Подробнее здесь: https://stackoverflow.com/questions/784 ... eetmap-org
Мобильная версия