Hi, I have two websites. I have an RSS feed from one that I want to host on the other, just the headlines and links back to the second website...
Right now I'm using SimpleXML and fopen/fclose to bring in the XML documents. But for some reason it's not working... here is the code I have now:
<?php
$url = 'http://www.mywebsite.com/rss.xml';
$rss_file = fopen($url, r);
$xml = simpleXML_load_file($url);
foreach ($xml->item as $item) {
echo $item->title . '<br />';
}
fclose($rss_file);
?>
The RSS feed right now is just:
<item>
<title>This is a title</title>
<description>This is a desctription...</description>
</item>
Any ideas? Or is there a better way to do this?