Hello.
I'm setting up a system to find the nearest service provider on the zip.
For this I used the script below to convert zip into coordinate.
$cep = "01238010";
$geocode = file_get_contents('http://maps.google.com/maps/api/geocode/json?address='.$cep.'&sensor=false');
$output= json_decode($geocode);
$lat = $output->results[0]->geometry->location->lat;
$long = $output->results[0]->geometry->location->lng;
How do I find providers that are within 5km of this coordinate?
I have a mysql database with the ceps and registered coordinates of the providers.
I'm using PHP and Mysql.
Thank you!