How to check if and RSS-feed is "okay"

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
nakkeli
Forum Newbie
Posts: 15
Joined: Thu Apr 10, 2008 1:18 am

How to check if and RSS-feed is "okay"

Post by nakkeli »

Hi!

I'm trying to create an RSS-parser, which would load RSS-feeds from local newspapers and parse them according to rules. The only problem is, sometimes those feeds are down and I have no idea of knowing are they online. I tried file_exists but that didn't work. Also tried some code(s) I found googling but they were not so good. So, is there a way to check if an RSS feed is online before I start processing it?
calcop
Forum Newbie
Posts: 20
Joined: Fri Mar 04, 2005 2:13 pm

Re: How to check if and RSS-feed is "okay"

Post by calcop »

When you pull the data, make sure the xml and rss tags exists before parsing it.
Post Reply