- file_get_contents: documentation ( source)
- var_dump: documentation ( source)
- json_decode: documentation ( source)
<?php
$api_endpoint = "http://maps.googleapis.com/maps/api/geocode/json?address=";
$request_uri = $api_endpoint . "Port d'Andratx&sensor=false";
$json = file_get_contents($request_uri);
$map_array = json_decode($json);
var_dump($map_array);