$url_list ="https://www.aaa.com/aaa.xml"; $c_data_list = file_get_contents($url_list); $xml = simplexml_load_string($c_data_list);
foreach($xml->channel->item as $item) { $title = $item->title; $link = $item->link; $pubDate = $item->pubDate;
//$content = $item->content; $content=$item->children("content", true);
echo " $title <br>$link <br> $pubDate <br> $content <br><hr> ";
}
|