PHPackages                             kalimeromk/rssfeed - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. kalimeromk/rssfeed

ActivePackage[Utility &amp; Helpers](/categories/utility)

kalimeromk/rssfeed
==================

Full-Text RSS extraction package for Laravel - converts partial RSS feeds to full content

v4.0(2mo ago)3511↓50%MITPHPPHP &gt;=8.0

Since Jun 11Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/KalimeroMK/RssFeed)[ Packagist](https://packagist.org/packages/kalimeromk/rssfeed)[ RSS](/packages/kalimeromk-rssfeed/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (11)Versions (24)Used By (0)

Laravel Full-Text RSS Package
=============================

[](#laravel-full-text-rss-package)

[![PHP Version](https://camo.githubusercontent.com/eed8831a0d43fbfc82808bf141626e5b1c2190b8924b8c41971019a8910a411a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e302b2d626c75652e737667)](https://php.net)[![Laravel Version](https://camo.githubusercontent.com/3d93e360949b4a36a557576d8761cede9dac183bf387ceb364fdede1bc0cadfe/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d392e302b2d6f72616e67652e737667)](https://laravel.com)

A comprehensive RSS feed processing package for Laravel that extracts full-text content from RSS/Atom feeds. This package ports the powerful Full-Text RSS functionality from the original FiveFilters project to Laravel.

✨ Features
----------

[](#-features)

- 📰 **Full-Text Extraction** - Converts partial RSS feeds to complete articles
- 🤖 **Readability Algorithm** - Automatically detects main content using the Arc90 Readability algorithm
- 🌐 **Site Configs** - 1679+ site-specific configurations for better extraction
- 🖼️ **Image Processing** - Extracts and saves images with Spatie Media Library support
- 🔍 **Language Detection** - Automatically detects article language
- 🧹 **HTML Sanitization** - XSS filtering and inline style removal
- 📄 **Multi-Page Support** - Handles articles split across multiple pages
- 📝 **Multiple Output Formats** - RSS 2.0, Atom, and JSON Feed formats
- 🔐 **Security** - API key validation, domain whitelist/blacklist
- 💾 **Caching** - Built-in cache support via Laravel Cache
- ⚡ **Modern PHP** - Type-safe with PHP 8.0+ features

📦 Installation
--------------

[](#-installation)

```
composer require kalimeromk/rssfeed
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --tag=config
```

### Publish Site Configs (Optional)

[](#publish-site-configs-optional)

```
php artisan vendor:publish --tag=site-configs
```

⚙️ Configuration
----------------

[](#️-configuration)

The configuration file is located at `config/rssfeed.php`:

```
return [
    // Enable/disable the service
    'enabled' => true,

    // Security settings
    'key_required' => false,
    'api_keys' => [],
    'allowed_hosts' => [],
    'blocked_hosts' => [],

    // Feature toggles
    'singlepage_enabled' => true,
    'multipage_enabled' => true,
    'caching_enabled' => false,
    'xss_filter_enabled' => false,
    'detect_language' => true,

    // Cache settings
    'cache_time' => 10, // minutes

    // HTML parser settings
    'html_parser' => 'html5php', // or 'libxml'
];
```

🚀 Usage
-------

[](#-usage)

### Basic RSS Feed Parsing

[](#basic-rss-feed-parsing)

```
use RssFeed;

// Parse RSS feed
$feed = RssFeed::RssFeeds('https://example.com/feed.xml');

// Get feed items
foreach ($feed->get_items() as $item) {
    echo $item->get_title();
    echo $item->get_description();
}
```

### Full-Text Content Extraction

[](#full-text-content-extraction)

```
use Kalimeromk\Rssfeed\FullTextExtractor;

$extractor = app(FullTextExtractor::class);

// Extract from URL
$result = $extractor->extract('https://example.com/article');

if ($result['success']) {
    echo $result['title'];
    echo $result['content'];
    echo $result['author'];
    echo $result['language'];
}

// Extract from HTML string
$result = $extractor->extractFromHtml($html, 'https://example.com/article');
```

### Process Feed with Full Content

[](#process-feed-with-full-content)

```
use RssFeed;

$items = RssFeed::parseRssFeeds('https://example.com/feed.xml');

foreach ($items as $item) {
    echo $item['title'];
    echo $item['content']; // Full article content
    echo $item['author'];
    echo $item['language'];
}
```

### Clean Text Extraction (No HTML)

[](#clean-text-extraction-no-html)

```
$items = RssFeed::parseRssFeedsClean('https://example.com/feed.xml');

foreach ($items as $item) {
    echo $item['content']; // Plain text, no HTML
}
```

### Generate Feed Output

[](#generate-feed-output)

```
use Kalimeromk\Rssfeed\Services\FeedOutputService;

$outputService = app(FeedOutputService::class);

// RSS 2.0
$rss = $outputService->toRss($feedData);

// Atom
$atom = $outputService->toAtom($feedData);

// JSON Feed
$json = $outputService->toJson($feedData);
```

### Image Handling

[](#image-handling)

```
// Extract images from feed item
$images = RssFeed::extractImagesFromItem($item);

// Save images to storage
$savedImages = RssFeed::saveImagesToStorage($images, $model);
```

### HTML Sanitization

[](#html-sanitization)

```
use Kalimeromk\Rssfeed\Services\HtmlSanitizerService;

$sanitizer = app(HtmlSanitizerService::class);

// Basic sanitization
$clean = $sanitizer->sanitize($html);

// Remove inline styles
$noStyles = $sanitizer->sanitizeWithoutStyles($html);

// Strip all HTML
$text = $sanitizer->stripAllTags($html);
```

🔧 Advanced Usage
----------------

[](#-advanced-usage)

### Custom Site Configuration

[](#custom-site-configuration)

Create custom extraction rules in `site_config/custom/{hostname}.txt`:

```
# Example: example.com.txt
body: //article[contains(@class, 'main-content')]
title: //h1
author: //span[@class='author-name']
date: //time[@pubdate]

# Remove unwanted elements
strip_id_or_class: ads,comments,sidebar
strip: //div[@class='donation-form']

```

### Domain-Specific Selectors

[](#domain-specific-selectors)

Add to `config/rssfeed.php`:

```
'content_selectors' => [
    'example.com' => '//div[@class="article-content"]',
    'news.example.com' => '//article[contains(@class, "story")]',
],
```

### Content Cleanup Rules

[](#content-cleanup-rules)

```
'remove_selectors' => [
    '.donation-form',
    '.share-buttons',
    '.comments',
    '.advertisement',
],
```

🧪 Testing
---------

[](#-testing)

```
composer test
```

📂 Package Structure
-------------------

[](#-package-structure)

```
src/
├── Extractors/
│   ├── Readability/          # Arc90 Readability port
│   │   ├── Readability.php
│   │   └── JSLikeHTMLElement.php
│   └── ContentExtractor/     # Site config extraction
│       ├── ContentExtractor.php
│       └── SiteConfig.php
├── Handlers/
│   ├── MultiPageHandler.php  # Multi-page article handling
│   └── SinglePageHandler.php # Single-page view detection
├── Services/
│   ├── CacheService.php      # Laravel cache wrapper
│   ├── FeedOutputService.php # RSS/Atom/JSON generation
│   ├── HtmlSanitizerService.php
│   ├── LanguageDetectionService.php
│   └── SecurityValidator.php
├── FullTextExtractor.php     # Main extraction class
├── RssFeed.php              # Original RSS functionality
└── RssfeedServiceProvider.php

site_config/
└── standard/                # 1679+ site configurations

```

🔄 Migration from Original Full-Text RSS
---------------------------------------

[](#-migration-from-original-full-text-rss)

Original FeatureLaravel Equivalent`Readability.php``FullTextExtractor::extract()`Site Config filesSame format, copied to `site_config/``makefulltextfeed.php``FeedOutputService``htmLawed``HtmlSanitizerService` (HTMLPurifier)`Zend_Cache``CacheService` (Laravel Cache)📝 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) for details.

🙏 Credits
---------

[](#-credits)

This package is based on the [Full-Text RSS](https://github.com/fivefilters/full-text-rss) project by FiveFilters.org, ported to Laravel with modern PHP practices.

- Original Readability by Arc90 Labs
- Ported to PHP by Keyvan Minoukadeh
- Laravel adaptation by Zorab Shefot Bogoevski

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance83

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 86.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~44 days

Recently: every ~84 days

Total

23

Last Release

88d ago

Major Versions

v1.2.1 → v2.12024-02-03

v2.4 → v3.12025-02-22

v3.9 → v4.02026-02-19

PHP version history (2 changes)v1PHP &gt;=7.4

v3.9PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/472c4da0220f15747dd81d3a27ffbba022a06ab20f64a367ddcaacd790d812d7?d=identicon)[KalimeroMK](/maintainers/KalimeroMK)

---

Top Contributors

[![KalimeroMK](https://avatars.githubusercontent.com/u/24772657?v=4)](https://github.com/KalimeroMK "KalimeroMK (32 commits)")[![zbogoevski](https://avatars.githubusercontent.com/u/220718845?v=4)](https://github.com/zbogoevski "zbogoevski (5 commits)")

---

Tags

agregationlaravelrss-aggregatorrss-feedlaravelfeedrssreadabilitycontent extractionfull-text

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/kalimeromk-rssfeed/health.svg)

```
[![Health](https://phpackages.com/badges/kalimeromk-rssfeed/health.svg)](https://phpackages.com/packages/kalimeromk-rssfeed)
```

###  Alternatives

[spatie/laravel-feed

Generate rss feeds

9743.6M28](/packages/spatie-laravel-feed)[rumenx/php-feed

Framework-agnostic PHP Feed generator for Laravel, Symfony, and more.

3652.3k](/packages/rumenx-php-feed)[thujohn/rss

RSS builder for Laravel 4

72130.0k3](/packages/thujohn-rss)[fkr/simplepie-bundle

Integrates SimplePie into Symfony

11137.5k](/packages/fkr-simplepie-bundle)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
