function jsonh_decode($str, $assoc = false, $depth = 512, $options = 0) { return JSONH::parse($str, $assoc, $depth, $options); }
function mapInfo_($in) { $mapOptions = array('mode' => !empty($in['town']) ? 'phone' : 'pad', 'code' => $in['code'], 'city' => $in['city'], 'town' => $in['town']); $url = cURL::buildUrl('http://church.oursweb.net/lite/mapinfo', $mapOptions); $rdata = cURL::get($url); $data = json_decode($rdata, true); $body = JSONH::parse($data['geoinfo']); return $body; }