casivaagustin/feedtcher

Gets ATOM and RSS Feeds

1.0.2 2016-02-15 17:43 UTC

This package is not auto-updated.

Last update: 2024-12-02 14:33:33 UTC


README

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 = 'http://casivaagustin.com.ar/?feed=rss2'; 
    $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 !