function getWalkScore($lat, $lon, $address) { $address=urlencode($address); $url = "http://api.walkscore.com/score?format=json&address=$address"; $url .= "&lat=$lat&lon=$lon&wsapikey=19b2a1a0e97448e7f519578f44117487"; $str = @file_get_contents($url); return $str; } $lat = $_GET['lat']; $lon = $_GET['lon']; $address = stripslashes($_GET['address']); $json = getWalkScore($lat,$lon,$address); echo $json; ?>