Example #1
0
 /**
  * Return the word of the day in RSS format
  *
  * @param Lang $lang The language object is use when the connection with forum isn't ok
  * @access public
  * @static
  * @return string The word of the day or an error message if the connection with forum isn't ok
  */
 public static function getWotdRss($lang)
 {
     $url = Config::getFluxbbForum() . '/extern.php?action=new&show=1&type=last_rss&fid=' . Config::getFluxbbWotdId();
     $text = file_get_contents($url);
     if ($text === false) {
         $text = $lang->getForumError();
     } else {
         $text = utf8_encode($text);
     }
     return $text;
 }