0

I want to parse information in:

http://feeds.informationweek.com/infoweek/news http://feeds.news.com.au/public/rss/2.0/fs_breaking_news_13.xml http://rss.cnn.com/rss/cnn_topstories.rss

using php.

And save the info in my database as: Headline, time, Description, Category

Also category, is show when i click on the link, it shows me the category of article (say world, travel, sports etc)

Plz help me with this issue.

I have never done parsing before.

Zeeshan

2 Answers 2

3

If you do not know PHP + MySQL, please read about it first. As for the parsing you got plenty of options:

Sign up to request clarification or add additional context in comments.

Comments

1

Use SimpleXML for the parsing. From there, it should be pretty straight forward to loop over the items and insert the values into your database.

7 Comments

Don't use XML parsing libs to parse RSS feeds. They are more irregular than you think. Use a RSS parser. It is much easier.
Care to elaborate? I'm interested in knowing why an XML parser wouldn't work.
How do I find out the structure of my rss feed? I mean, when I open the link in my browser, it shows me a simple html page, rather then a structure with tags, which I need to fetch
@Zeeshan The first and third feeds you've provided only look pretty in your browser because they have an associated XSLT stylesheet. Try "View Source"
Thank Phil. Can you also tell me about the category. How should I figure out the category of the article.
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.