PHP的RSS生成类
类的调用:
$rss = new UniversalFeedCreator();
$rss->title = “Daily “.$cateArr[$k].” feed from phpzh.com”;
$rss->link = “http://www.phpzh.com”;
$rss->description = “Daily top downloaded videos in savevideo.org “.$cateArr[$k].” category.”;
$softList = $SQL;
if (is_array($softList) && count($softList) > 0) {
foreach ($softList as $rs) {
$item = new FeedItem();
$item->title = $rs['title'];
$item->link = ‘http://www.phpzh.com/v.php?id=’.$rs['id'];
$item->description = $rs['content'];
$rss->addItem($item);
}
$rss->saveFeed(“RSS2.0″, $_SERVER["DOCUMENT_ROOT"].”/rss/rss_”.spastr($cateArr[$k]).”.xml”);
}
}
页面: 1 2
You are so right… God bless you for what you wrote.
I like it! Very appropriate. Thank you.
I definitely agree,is like the saying
You do the big deal and good deal.
Memories are made of this – thanks for sharing Hope …
Wonderful news…
Thanks.Keep up the good work
Very much like this.