我有这段代码可以将多个url合并到xml文件中,但是它无法读取文件中的新闻提要来对其进行编辑。 如何获取此文件的网址或从数组中获取供稿?
$websites = array('https://abcnews.go.com/abcnews/topstories','http://rss.cnn.com/rss/edition.rss/');
$entries = array();
foreach ($websites as $feed) {
$xml = simplexml_load_file($feed);
$entries = array_merge($entries, $xml->xpath('/rss//item'));
print_r($entries); }