Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 661 → Rev 662

/trunk/jrest/services/CoordSearch.php
23,6 → 23,8
 
$commune = urldecode($uid[2]);
$code_postal = str_replace('"','',urldecode($uid[3]));
$coord_json = json_encode(array());
 
if(isset($uid[4]) && $uid[4] != "*" && $uid[4] != "?") {
$code_pays = urldecode($uid[4]);
32,7 → 34,7
 
if($lat != '*' && $lng != '*') {
 
$commune_json = file_get_contents("http://ws.geonames.org/findNearbyJSON?featureClass=ADM4&lat=".urlencode($lat)."&lng=".urlencode($lng)."&style=full") ;
$commune_json = @file_get_contents("http://ws.geonames.org/findNearbyJSON?featureClass=ADM4&lat=".urlencode($lat)."&lng=".urlencode($lng)."&style=full") ;
header("Content-Type: text/html; charset=UTF-8");
$value = $commune_json ;
 
45,7 → 47,7
}
$requete .= "&country=".urlencode($code_pays)."&maxRows=10" ;
 
$coord_json = file_get_contents($requete);
$coord_json = @file_get_contents($requete);
 
header("Content-Type: text/html; charset=UTF-8");
$value = $coord_json ;