Gets ATOM and RSS Feeds

curl, http, rest, atom, rss



Library for fetch RSS and ATOM Feeds

How to use it

Just add this library to your composer.json, or set the paths for your autoloader. Add PHRequests and HTML Purifier as dependency also.

And just do something like this in your code.

    $url = ''; 
    $feed = Feedtcher\Feedtcher::fetch($url);

This will return a Feed Object with a collection of Entries. Feed does not have all the possible entries from the feed, it just fetch.

  • Title
  • Description
  • Link
  • Date
  • Author

And Entries have

  • Title
  • Description
  • Author
  • Date
  • Link

To get Feed fields just read as attributes.

  $feed->title ...
  $feed->link  ...

And for Entries use the feed object as array

  $feed[0]->title ...
  $feed[0]->description ...
  $feed[0]->author ...

Works with RSS and ATOM.

That is all !