我想用PHP解析Google News rss.我设法运行此代码:
<?
$news = simplexml_load_file('http://news.google.com/news?pz=1&cf=all&ned=us&hl=en&topic=n&output=rss');
foreach($news->channel->item as $item) {
echo "<strong>" . $item->title . "</strong><br />";
echo strip_tags($item->description) ."<br /><br />";
}
?>
Run Code Online (Sandbox Code Playgroud)
但是,我无法解决以下问题.例如:
谢谢.