<?php
$url = 'http://www3.nhk.or.jp/rss/news/cat0.xml';

require_once '../rss/magpierss/rss_fetch.inc';
$rss = fetch_rss($url);
?>
<table class="index_rss_table" style="border-color: Royalblue; background-color: Royalblue; width:158px;">
<tr><th class="index_rss_title"><a href="http://www.nhk.or.jp/" target="_blank">NHK News</a></th></tr>
<tr><td class="index_rss_article" style="border-color: Royalblue;">
<ul style="margin:0 0 0 17px; padding:0; list-style:none; list-style-image:url('../rss/icon/044.gif');">
<?
$cnt = 0;
$cntmax = 5;
foreach ($rss->items as $item) {
?>
	<li style="margin: 2px 0 2px 0;"><a href="<?= $item['link'] ?>" target="_blank"><?= $item['title'] ?></a>
	<span style="color: #907070;">(<?= date("y/m/d H:i:s", strtotime((string)$item['pubdate'])) ?>)</span>
	</li>
<?php
	if (++$cnt >= $cntmax) break;
}
?>
</ul>
</td></tr></table>
