$coordinates = file_get_contents('http://maps.googleapis.com/maps/api/geocode/json?ad## Heading ##dress=' . urlencode($address) . '&sensor=true'); $coordinates = json_decode($coordinates); $lat = $coordinates->results[0]->geometry->location->lat; $lng = $coordinates->results[0]->geometry->location->lng;