Subversion Repositories eFlore/Applications.cel

Rev

Rev 1930 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1930 Rev 2123
Line 52... Line 52...
52
		$this->url_service_chorologie_obs = $config['eflore']['url_service_chorologie_obs'];
52
		$this->url_service_chorologie_obs = $config['eflore']['url_service_chorologie_obs'];
53
		$this->config = $config;
53
		$this->config = $config;
54
	}
54
	}
Line 55... Line 55...
55
	
55
	
56
	public function rechercherGenreEspeceSurPrefixe($genre = null, $espece = null) {
-
 
57
		
56
	public function rechercherGenreEspeceSurPrefixe($genre = null, $espece = null) {
58
		$liste_genre_espece = array();	
57
		$liste_genre_espece = array();	
59
		$this->masque_recherche = trim(trim($genre).' '.trim($espece,' *'));
58
		$this->masque_recherche = trim(trim($genre).' '.trim($espece,' *'));
60
		$masque = urlencode($this->masque_recherche);
59
		$masque = urlencode($this->masque_recherche);
61
		if(self::DEBUG) error_log("CEL fetch: " . $this->url_service_nom.'?masque='.$masque.'&recherche=etendue&retour.format=min&navigation.limite=50&ns.structure=au');
60
		if(self::DEBUG) error_log("CEL fetch: " . $this->url_service_nom.'?masque='.$masque.'&recherche=etendue&retour.format=min&navigation.limite=50&ns.structure=au');
-
 
61
		$urlService = $this->url_service_nom.'?masque='.$masque.'&recherche=etendue&retour.format=min&navigation.limite=50&ns.structure=au';
62
		$requete = @file_get_contents($this->url_service_nom.'?masque='.$masque.'&recherche=etendue&retour.format=min&navigation.limite=50&ns.structure=au');
62
		$requete = @file_get_contents($urlService);
63
		if($requete != '') {
63
		if($requete != '') {
64
			$requete = json_decode($requete);		
64
			$requete = json_decode($requete);		
65
			if(is_object($requete) && isset($requete->resultat)) {
65
			if(is_object($requete) && isset($requete->resultat)) {
66
				foreach ($requete->resultat as $id => $res) {
66
				foreach ($requete->resultat as $id => $res) {