/** * Return the comments for a strip * * @param Strip $strip The strip for which we want obtain the comments * @param Lang $lang The language object is use when the connection with forum isn't ok * @access public * @static * @return string The comments for the strip or an error message if the connection with forum isn't ok */ public static function getComments(Strip $strip, Lang $lang) { $url = Config::getFluxbbForum() . '/extern.php?action=topic&ttitle=' . urlencode($strip->getTitle()) . '&max_subject_length=' . Config::getFluxbbMaxLength(); $text = file_get_contents($url); if ($text === false) { $text = $lang->getForumError(); } else { $text = utf8_encode($text); } return $text; }