12.12阅读RSS和Atom Feeds
12.12.1问题
You want to retrieve RSS and Atom feeds and look at the items. This allows you to incorporate newsfeeds from
multiple web sites into your application.
你想要找回RSS和Atom feeds和考虑在这个items. 它允许你合并newsfeeds从多种web sites到你的应用程序
12.12.2解答
Use the MagpieRSS parser. Here’s an example that reads the RSS feed for the php.announce mailing list:
使用这个MagpieRss 剖析器。这里是一个例子阅读Rss feed到这个php.annouce邮件发送清单
?php
require ‘rss_fetch.inc’;
$feed = ‘http://news.php.net/group.php?group=php.announce&format=rss’;
$rss = fetch_rss( $feed );
print “<ul>\n”;
foreach ($rss->items […]