I'm attempting to parse a wordpress RSS feed from PHP. The following works fine on my local server, but not with the host my site is actually on.
$url = "../blog/feed/";
$rss = simplexml_load_file($url);
foreach ($rss->channel->item as $item)
{
//Do stuff
}
However, on the server my site is hosted, I get the error "I/O warning : failed to load external entity"
Interestingly enough, though, whenever I manually save the RSS file as an xml file and point to that file, everything works fine. So while I could manually save and upload the xml file after every post I do, I'd rather automate it.
I really appreciate your time. I'll probably talk to the host about it after this.