Subversion Repositories eFlore/Applications.cel

Compare Revisions

Ignore whitespace Rev 2564 → Rev 2565

/trunk/jrest/bibliotheque/RechercheInfosZoneGeo.php
17,6 → 17,8
*/
class RechercheInfosZoneGeo extends Cel {
public $maxTimeoutRequeteMondiale = 0;
/**
* Cas de la demande par lat et lon
* array(
206,7 → 208,12
$url_sans_pays = $this->config['cel']['url_service_geo_mondial'].'?masque='.urlencode($nom).'&niveau='.$niveau.'&limite='.$limite;
$url = $url_sans_pays.(!empty($pays) ? '&pays='.urlencode($pays) : '');
 
$res = @json_decode(file_get_contents($url), true);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, $this->maxTimeoutRequeteMondiale);
$reponse = curl_exec($ch);
$res = @json_decode($reponse, true);
 
$retour = array();