hosseinhunta/huntfeed 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

hosseinhunta/huntfeed

Composer 安装命令:

composer require hosseinhunta/huntfeed

包简介

Event-driven PHP library for consuming, normalizing, and distributing RSS, Atom, and WebSub (PubSubHubbub) feed updates with real-time push notifications.

README 文档

README

🔥 Real-Time RSS/Atom Feed Management with WebSub Support

PHP Version License: MIT GitHub Stars Packagist Downloads WebSub Ready Tests Passing

HuntFeed, event-driven PHP library for consuming, normalizing, and distributing RSS, Atom, and WebSub

HuntFeed is a production-ready, event-driven PHP library for consuming, normalizing, and distributing RSS, Atom, and WebSub feed updates with real-time push notifications. Perfect for feed aggregators, news readers, and content monitoring applications.

✨ Why Choose HuntFeed?

📊 Performance Benchmarks

Scenario Traditional Polling HuntFeed with WebSub Improvement
100 feeds, 15-min interval 9,600 requests/day ~100 requests/day 99% fewer requests
Bandwidth Usage ~5 MB/day <100 KB/day 98% reduction
Update Latency 15 minutes <1 second 150x faster
Server Load Continuous polling Event-driven Massively scalable

🆚 HuntFeed vs SimplePie

Feature SimplePie HuntFeed
Real-Time Updates ❌ Polling only ✅ WebSub push
PHP Version 5.2+ 8.1+ (modern features)
Feed Formats RSS, Atom RSS, Atom, JSON Feed, RDF, GeoRSS
Performance 9,600 reqs/day ~100 reqs/day
Security Basic HMAC-SHA1
Export Formats 2 formats 7 formats

🛡️ Trust & Production Ready

✅ Security Features

  • HMAC-SHA1 Verification – All WebSub notifications are signed
  • SSL/TLS Enforcement – HTTPS required in production
  • Challenge Verification – Prevents unauthorized subscriptions
  • No Data Leakage – Sensitive data never logged

✅ Enterprise-Grade

  • 12+ Comprehensive Tests – All passing
  • PSR-12 Compliant Code – Industry standards
  • 2000+ Lines Documentation – Complete coverage
  • Active Maintenance – Regular updates and security patches

📦 Quick Installation

Requirements

  • PHP 8.1+ (Takes advantage of modern PHP features)
  • cURL extension (For HTTP requests)
  • SimpleXML extension (For XML parsing)
  • JSON extension (For JSON handling)

No external dependencies for core functionality!

composer require hosseinhunta/huntfeed

Basic Usage - Get Started in 30 Seconds

<?php
require 'vendor/autoload.php';

use Hosseinhunta\Huntfeed\Hub\FeedManager;

$manager = new FeedManager();

// Register your feeds
$manager->registerFeeds([
    'tech' => [
        'url' => 'https://news.ycombinator.com/rss',
        'category' => 'Technology',
        'interval' => 300 // 5 minutes
    ]
]);

// Check for updates
$updates = $manager->checkUpdates();

// Export to any format
$json = $manager->export('json'); // Perfect for APIs
$rss = $manager->export('rss');   // For feed readers

🔧 Advanced Features

📡 Multi-Format Feed Support

  • RSS 2.0 - Dublin Core, Media RSS, Content Encoded
  • Atom 1.0 - Full specification support
  • JSON Feed - Modern JSON-based format
  • RDF/RSS 1.0 - Legacy format support
  • GeoRSS - Geographic-aware feeds
  • Auto-detection - Automatically identifies feed format

🔔 WebSub Implementation

use Hosseinhunta\Huntfeed\WebSub\WebSubManager;

$webSubManager = new WebSubManager(
    $manager,
    'https://your-domain.com/callback.php'
);

$webSubManager->setAutoSubscribe(true);
$webSubManager->registerFeedWithWebSub('tech', 'https://example.com/feed.xml');

📊 Smart Feed Management

  • Duplicate prevention - 3 fingerprinting strategies
  • Category organization - Multi-category support
  • Advanced search - Search across titles, content, categories
  • Event-driven architecture - Hook into feed updates
  • Batch processing - Handle multiple feeds efficiently (Soon)

🎨 7 Export Formats

// Export to any format your application needs
$manager->export('json');      // API responses
$manager->export('rss');       // RSS feed generation
$manager->export('atom');      // Atom feed generation
$manager->export('jsonfeed');  // JSON Feed format
$manager->export('csv');       // Excel/database import
$manager->export('html');      // Web display
$manager->export('text');      // Plain text

🎯 Use Cases

🤖 Telegram Bots

$manager->on('item:new', function($data) {
    sendTelegramAlert($data['item']);
});

📱 Mobile App Backends

// API endpoint
$app->get('/api/feeds', function() use ($manager) {
    return $manager->export('json');
});

📰 News Aggregators

$manager->registerFeeds([
    'tech' => 'https://techcrunch.com/feed/',
    'news' => 'https://bbc.com/news/world/rss.xml',
    'sports' => 'https://espn.com/rss'
]);

🔍 Content Monitoring

Monitor competitors, keywords, or industry news with instant notifications.

🧪 Testing & Quality

# Run comprehensive test suite
php tests/QuickStartTest.php

# Run WebSub-specific tests
php tests/WebSubTest.php

# Run polling tests
php tests/poling-test.php

All 12+ tests pass - Production-ready code.

🔒 Security Features

Enterprise-Grade Security

  • HMAC-SHA1 Verification - All WebSub notifications are signed
  • SSL/TLS Enforcement - HTTPS required in production
  • Challenge Verification - Prevents unauthorized subscriptions
  • Input Validation - All URLs and content validated
  • XML Safety - XXE attack prevention
  • No Data Leakage - Sensitive data never logged

🔐 Best Practices Included

// Production configuration
$manager->setConfig('https_required', true);
$manager->setConfig('verify_ssl', true);
$manager->setConfig('hmac_secret', getenv('WEBSUB_SECRET'));

📚 Documentation

Getting Started

  • Quick Start Guide – 5-minute setup
  • WebSub Implementation – Complete 2000+ line guide
  • API Reference – Full method documentation

Production Deployment

  • Security Policy – Enterprise security
  • SSL Certificate Fix – Troubleshooting
  • Architecture Overview – System design

👥 Community & Support

📞 Get Help

🤝 Contributing

We welcome contributions! See our:

📊 Changelog & Roadmap

Version 1.0.0 (Current)

  • Complete feed management system
  • Full WebSub implementation
  • Multi-format export
  • Production-ready security

🚧 Roadmap

  • v1.1.0: Database persistence for subscriptions
  • v1.2.0: Redis caching, batch processing
  • v2.0.0: REST API, GraphQL, Dashboard UI

See full Changelog

📄 License

MIT License - Free for commercial and personal use.

🎯 Ready for Production?

# 1. Install
composer require hosseinhunta/huntfeed

# 2. Run tests
php tests/QuickStartTest.php

# 3. Check the examples
php examples/WebSubExample.php

Join hundreds of developers who trust HuntFeed for their feed management needs!

Star HuntFeed on GitHub

GitHub

Need help? Check our complete documentation or open an issue!

HuntFeed, event-driven PHP library for consuming, normalizing, and distributing RSS, Atom, and WebSub

hosseinhunta/huntfeed 适用场景与选型建议

hosseinhunta/huntfeed 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 12 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「parser」 「atom」 「notification」 「feed」 「rss」 「pubsubhubbub」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 hosseinhunta/huntfeed 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 hosseinhunta/huntfeed 我们能提供哪些服务?
定制开发 / 二次开发

基于 hosseinhunta/huntfeed 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 34
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-15