Download the PHP package forensic/feed-parser without Composer
On this page you can find all versions of the php package forensic/feed-parser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download forensic/feed-parser
More information about forensic/feed-parser
Files in forensic/feed-parser
Package feed-parser
Short Description A fully integrated ATOM, RSS and RDF syndication feed parser
License MIT
Informations about the package feed-parser
PHP Feed Parser
PHP Feed Parser is a fully integrated web syndication feed parser. It can successfully parse all the three major syndication feeds which include RSS, ATOM & RDF feeds.
It produces clean, unified parse accross all the three supported feed types. It is configurable, lightweight, fully tested and allows one to parse feeds from three different sources that includes parsing from url, from file or from string.
Getting Started
Install via composer:
Create an instance as shown below:
Export Feed as JSON
You can also export the parsed feed as json, as shown below. This can also help you view all properties that are accessible in the parsed feed.
Parser Options
The following configuration options can be passed in when creating an instance or set through the designated public methods:
-
default_lang:
This option sets the default feed language property to use should there be no language entry found in the xml document.
-
remove_styles:
This option states if stylings found in any feed item's content, should be stripped off. The stylings include html
style
element and attribute. Defaults to true. -
remove_scripts:
This option states if any scripting found in any feed item's content, should be stripped off. Scripting includes html
script
element and event handleron-prefixed
element attributes such asonclick
. Defaults to true.
Testing FeedParser
To locally test or contribute to this project, You should have at least php 7.1, xDebug, composer and npm installed, then ollow the steps below:
Clone this repo:
Install dependencies:
Run test: