desarrolla2/rss-client

This package is abandoned and no longer maintained. The author suggests using the fastfeed/fastfeed package instead.

A simple to use RSS client library.

Maintainers

πŸ‘ desarrolla2

Package info

github.com/desarrolla2/RSSClient

pkg:composer/desarrolla2/rss-client

Statistics

Installs: 27 175

Dependents: 1

Suggesters: 0

Stars: 36

Open Issues: 0

v2.2.1 2013-12-04 09:19 UTC

Requires

Requires (Dev)

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT a6719ccd1bb0ca1efe243a3165cfc13c0b5f9843

feedrssrss20feed parseratom10

This package is auto-updated.

Last update: 2022-02-01 12:21:40 UTC


README

RSSClient will not be updated, you should consider migrating to FastFeed https://github.com/FastFeed/FastFeed

RSSClient

RSSClient is a simple to use RSS library to fetch and use RSS feeds. RSSClient is very fast!

πŸ‘ Build Status
πŸ‘ Scrutinizer Quality Score
πŸ‘ Code Coverage

πŸ‘ Latest Stable Version
πŸ‘ Total Downloads
πŸ‘ Bitdeli Badge

Formats Supported

Installation

With Composer

It is best installed it through packagist by including desarrolla2/rss-client in your project composer.json require:

 "require": {
 // ...
 "desarrolla2/rss-client": "dev-master"
 }

Without Composer

You can also download it from [Github] (https://github.com/desarrolla2/RSSClient), but no autoloader is provided so you'll need to register it with your own PSR-0 compatible autoloader.

Usage

Without Cache

This example does not use any cache, so it probably will be too slow to be used on a website, you should implement your system cache, or use the cache system described below

<?php

use Desarrolla2\RSSClient\RSSClient;

$client = new RSSClient();

$client->addFeeds(
 array(
 'http://news.ycombinator.com/rss',
 'http://feeds.feedburner.com/TechCrunch/',
 ),
 'news'
);

$feeds = $client->fetch('news');

With Cache

This example uses the cache implemented by desarrolla2/cache you must select the adapter depending on your needs, you can find all the info in the [Github repository] (https://github.com/desarrolla2/Cache).

<?php

// It is important that you select and configure your cache adapter
$client = new RSSClient();
$client->setCache(new Cache(new File('/tmp')));

You can see how to configure desarrolla2/cache in its [README] (https://github.com/desarrolla2/Cache)

The rest of the procedure is exactly the same as if you were using the client without cache.

<?php

$client->addFeeds(
 array(
 'http://news.ycombinator.com/rss',
 'http://feeds.feedburner.com/TechCrunch/',
 ),
 'news'
);

$feeds = $client->fetch('news');

Limiting the number of elements

You can use the second parameter of fetch to limit the number of elements

<?php

$feeds = $client->fetch('news', 20);

Other

Contact

You can contact with me on twitter.