error("Missing group"); } if (isset($_GET['format'])) { $format = $_GET['format']; } else { // assume html $format = 'html'; } if (isset($_GET['i'])) { $i = (int) $_GET['i']; } else { $i = 0; } try { $nntpClient = new \Web\News\Nntp(NNTP_HOST); $overview = $nntpClient->getArticlesOverview($group, $i); } catch (Exception $e) { error($e->getMessage()); } $host = htmlspecialchars($_SERVER['HTTP_HOST'], ENT_QUOTES, "UTF-8"); switch ($format) { case 'rss': header("Content-type: text/xml"); echo '<?xml version="1.0" encoding="utf-8"?>' . "\n"; ?> <rss version="0.93"> <channel> <title><?php echo $host; ?> : <?php