Using CURL
status == 'OK') {
$latitude = $response->results[0]->geometry->location->lat;
$longitude = $response->results[0]->geometry->location->lng;
echo 'Latitude: ' . $latitude;
echo '
';
echo 'Longitude: ' . $longitude;
} else {
echo $response->status;
var_dump($response);
}
?>