Exemplo n.º 1
0
 private function getWikiHtml($wikiText)
 {
     $curl = new CurlCall();
     $method = "wiki.parse";
     $url = 'http://' . $this->conf['WIKI_DOMAIN'] . $this->conf['WIKI_API'];
     $result = $curl->getFromPhpSourceAsPost($url, array('post-fields' => array("format" => 'php', 'action' => 'parse', 'text' => $wikiText), 'cache-ident' => $method, 'cache-time' => $this->conf['WIKI_HTML_CACHE_TIME'], 'user-agent' => 'WikiSlurp (http://github.com/NeilCrosby/wikislurp)'));
     if ($wikiText = $this->getDataFromArray($result, array('parse', 'text', '*'))) {
         return $wikiText;
     }
     return false;
 }
Exemplo n.º 2
0
 private function getWikiHtml($wikiText)
 {
     $curl = new CurlCall();
     $method = "wiki.parse";
     $url = 'http://' . $this->conf['WIKI_DOMAIN'] . $this->conf['WIKI_API'];
     $result = $curl->getFromPhpSourceAsPost($url, array('post-fields' => "format=php&action=parse&text=" . urlencode($wikiText), 'cache-ident' => $method, 'cache-time' => $this->conf['WIKI_HTML_CACHE_TIME']));
     if ($wikiText = $this->getDataFromArray($result, array('parse', 'text', '*'))) {
         return $wikiText;
     }
     return false;
 }