| Line 24... |
Line 24... |
| 24 |
* 2: Le service calcul le numero taxonomique associe
|
24 |
* 2: Le service calcul le numero taxonomique associe
|
| 25 |
* 3: Le service recherche une image disponible pour ce numero taxonomique
|
25 |
* 3: Le service recherche une image disponible pour ce numero taxonomique
|
| 26 |
* 4: Le service redimensionne l'image et la renvoie
|
26 |
* 4: Le service redimensionne l'image et la renvoie
|
| 27 |
*/
|
27 |
*/
|
| Line 28... |
Line -... |
| 28 |
|
- |
|
| 29 |
/** Constante stockant l'URL de la page d'accueil de Photoflora.*/
|
- |
|
| 30 |
define('EF_URL_PHOTOFLORA', 'http://photoflora.free.fr/');
|
- |
|
| 31 |
/** Constante stockant l'URL de la page de Photoflora affichant toutes les images d'un taxon donné.*/
|
- |
|
| 32 |
define('EF_URL_PHOTOFLORA_TAXON', EF_URL_PHOTOFLORA.'FiTax.php?NumTaxon=%s');
|
- |
|
| 33 |
/** Constante stockant l'URL du dossier de photoflora contenant les images miniatures.*/
|
- |
|
| 34 |
define('EF_URL_PHOTOFLORA_IMG_MIN', 'http://photoflora.free.fr/photos/%s/min/%s');
|
- |
|
| 35 |
/** Constante stockant l'URL du service XML de Photoflora.*/
|
- |
|
| 36 |
define('EF_URL_PHOTOFLORA_SERVICE', EF_URL_PHOTOFLORA.'ef_photoflora.php?nt=%s');
|
- |
|
| 37 |
|
- |
|
| 38 |
define('EF_URL_PHOTOFLORA_REGEXP_01', '/\/photos\/([^\/]+)\/max\/(.+)$/');
|
- |
|
| 39 |
define('EF_URL_PHOTOFLORA_REGEXP_02', '/photoflora([^.]+)\.free\.fr\/max\/(.+)$/');
|
- |
|
| 40 |
|
28 |
|
| Line 41... |
Line 29... |
| 41 |
class NameImage extends Cel {
|
29 |
class NameImage extends Cel {
|
| Line 42... |
Line 30... |
| 42 |
|
30 |
|
| - |
|
31 |
function getElement($uid){
|
| Line 43... |
Line 32... |
| 43 |
function getElement($uid){
|
32 |
|
| 44 |
|
33 |
$image = array();
|
| 45 |
$image = array();
|
34 |
$url_photoflora = $this->config['eflore']['url_service_photoflora'];
|
| 46 |
|
35 |
|
| 47 |
if(isset($uid[0])) {
|
36 |
if(isset($uid[0])) {
|
| 48 |
$url = 'http://photoflora.free.fr/eflore-photoflora/services/index.php/0.1/projets/photoflora/images?masque.nn='.$uid[0].'&navigation.limite=1';
|
37 |
$url = $url_photoflora.'?masque.nn='.$uid[0].'&navigation.limite=1';
|
| 49 |
$resultat = @file_get_contents($url);
|
38 |
$resultat = @file_get_contents($url);
|