I can't figure this out, I'm stumped.
Just updated my server from PHP 4 to PHP 5 to use SimpleXML, here is the code right from Nings website (example 2) to use to parse a XML feed. (This code works fine on my other server but not the one I just updated)
Here is that exact code:
<ul>
<?php
$jobs = simplexml_load_file('http://feeds.feedburner.com/ColoradoRockies');
foreach ($jobs->channel->item as $job) {
echo "<li><a href='{$job->link}'>".htmlentities($job->title).'</a></li>';
}
?>
</ul>
Note: I changed the RSS feed to the actual RSS xml feed I am trying to pull up.
Here is the output when I put that code on my site:
Warning: Invalid argument supplied for foreach() in /home/rockworld/public_html/home.php on line 25
Here is a link to my phpinfo():
http://www.rockiesworld.com/phpinfo.php
Any help would be highly appreciated.