Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Rss Client Laravel Package

desarrolla2/rss-client

Deprecated RSS/Atom feed fetcher (will not be updated; migrate to FastFeed). Simple, fast RSS2.0/Atom1.0 client: add multiple feed URLs under a group name and fetch entries, with optional caching via desarrolla2/cache adapters.

View on GitHub
Deep Wiki
Context7

Warning !!

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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui