//rss関連の関数を格納
function rss($blog, $rss){
require_once 'rss_fetch.inc';
require_once 'rss_utils.inc';
$num = 0;
$rss = fetch_rss($rss);
$title = $rss->channel['title'];
$title = mb_convert_encoding($title, "sjis", "auto");
if($rss){
foreach ($rss->items as $item ) {
$title = $item[title];
$title = mb_convert_encoding($title, "sjis", "auto");
$url = $item[link];
// $date = parse_w3cdtf($item['dc']['date']);
// $date = date("Y.m.d", $date);
$date = parse_w3cdtf($item['dc']['date']);
if($date=="-1"){
// $date = strftime("%Y.%m.%d",strtotime($item['created']));
$date = parse_w3cdtf($item['issued']);
$date = date("Y.m.d", $date);
}else{
$date = date("Y.m.d", $date);
}
echo "・$title ($date)
\n";
$num++;
if($num >= 2){break;}
}
}else{
echo "サーバーメンテナンス中です
";
}
echo "";
}
?>