Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What RSS parser should I use in PHP?

I am searching an RSS parser written in PHP. The problem is not that I cannot find one. The problem is that there are too many and it's hard to decide which one to use (especially when I have no experience with them and to try them is too time consuming).

Can anybody recommend me a "good" RSS parser?

The following requirements are important to me (given in order of importance):

  1. It's able to extract all information given in the feed (not only title, description and link but everything what is there, for example feeds author, feeds icon, items tags and so on).
  2. It should be able to read not only RSS feeds but also Atom feeds.
  3. It should be tolerant to "broken" RSS (Atom) feeds.
  4. It should be simple to use.
like image 593
Roman Avatar asked Sep 07 '10 07:09

Roman


People also ask

What is RSS feed in PHP?

Really Simple Syndication is used to publish often updated information from website like audio, video, images, etc. We can integrate RSS feeds to a website by using Ajax and php.

What is the parser in PHP?

PHP Parser is a library that takes a source code written in PHP, passes it through a lexical analyzer, and creates its respective syntax tree. This is very useful for static code analysis, where we want to check our own code not only for syntactic errors but also for satisfying certain quality criteria.


2 Answers

My defacto answer will be "have you tried SimplePie?", it's a very good XML parser but you'll have to have a look at their demo to see how it handles broken feeds :-)

like image 142
Ben Everard Avatar answered Oct 01 '22 01:10

Ben Everard


In addition to SimplePie already mentioned, there is Zend_Feed (which can be used standalone) and since this is XML anyway, you can also use any of the native XML extensions, like DOM or XMLReader.

like image 21
Gordon Avatar answered Oct 01 '22 02:10

Gordon