Hi, Does file_get_contents require api key? Currently the below statement doesnt work from PHP. $json= file_get_contents("https://nominatim.openstreetmap.org/search?q=".$address."&format=json&polygon=1&addressdetails=1"); I could use file_get_contents with other geocode api. What could be the problem? with nominatim Regards. asked 30 Nov '20, 07:06 migandhi |
file_get_contents can open a file or a URL. For a URL the setting Make sure you're sending the HTTP UserAgent or Referer as required by https://operations.osmfoundation.org/policies/nominatim/ , see https://help.openstreetmap.org/questions/59788/calling-nominatim-with-file_get_contents
answered 30 Nov '20, 12:35 mtmail Hi, Thanks, I saw all the links, The below link has information that email address is required. https://help.openstreetmap.org/questions/59788/calling-nominatim-with-file_get_contents/65036 This worked for me. Regards.
(30 Nov '20, 13:40)
migandhi
|