Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 1312 | Rev 1314 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1312 Rev 1313
Line 99... Line 99...
99
            $json = file_get_contents($this->plantuseurl.$this->parametres['masque']);
99
            $json = file_get_contents($this->plantuseurl.$this->parametres['masque']);
100
            if ($json != false) {
100
            if ($json != false) {
101
                $tableau = json_decode($json, TRUE);
101
                $tableau = json_decode($json, TRUE);
102
                if (isset($tableau['parse']['wikitext']['*'])) {
102
                if (isset($tableau['parse']['wikitext']['*'])) {
103
                    $texte = $tableau['parse']['wikitext']['*'];
103
                    $texte = $tableau['parse']['wikitext']['*'];
-
 
104
                    if (strpos($texte, "Résumé des usages") !== FALSE) {
104
                    $retour = substr($texte, strpos($texte, "{{Encadr")+63, -2);
105
                        $retour = substr($texte, strpos($texte, "{{Encadr")+63, -2);
105
                    
-
 
-
 
106
                    }                    
106
                }
107
                }
107
            }
108
            }
108
        }
109
        }
109
        return $retour;
110
        return $retour;
110
    }
111
    }