I have a class that I use for pulling in different RSS feeds on several different pages of my website.
My problem is when one of the feeds has an issue, (such as a feed going down temporarily), it gives me fatal php errors, therefore breaking my site.
$rawFeed = @file_get_contents("http://www.website.com/feed");
$xml = new SimpleXmlElement($rawFeed);
This is the basic code that I use to pull the rss feeds. The new SimpleXmlElement
is what ultimately gives the fatal error.