PicoFeed

解析和编写 RSS/Atom 订阅的 PHP 库。「PHP library to parse and write RSS/Atom feeds」

Github stars Tracking Chart

PicoFeed - PHP Library to manage Atom and RSS Feeds  PicoFeed - 管理 Atom 和 RSS 订阅的 PHP 库

这是原始 picoFeed(已被废弃)的一个分叉。

该分叉版将努力使 picofeed 尽可能简单、快速和现代化,删除所有与解析和创建 feed 无关的内容,并用第三方组件取而代之。最值得注意的是,现在所有 HTTP 请求都由 Guzzle 处理,日志可选择由 Monolog 处理,缓存可选择由 Guzzle Middlewares 处理。

特性

  • 简单快捷
  • Atom 1.0 和 RSS 0.91、0.92、1.0 和 2.0 的 Feed 解析器
  • 适用于 Atom 1.0 和 RSS 2.0 的 Feed 写入器
  • Favicon 抓取器
  • 导入/导出 OPML 订阅
  • 内容过滤器: HTML 清理、移除像素跟踪器和广告
  • 代理支持
  • 内容抓取器:从原始网站下载完整内容
  • 附件检测
  • 支持 RTL 语言
  • 授权许可 MIT

要求

  • PHP >= 7.1
  • libxml >= 2.7
  • XML PHP extensions: DOM and SimpleXML
  • cURL or Stream Context (allow_url_fopen=On)
  • iconv extension

安装

版本

  • 开发版本: master
  • 稳定版本: 使用最后一个 tag

Install with composer

composer require nicolus/picofeed @stable
 

使用 Composer 自动加载器的示例:

<?php

require 'vendor/autoload.php';

use PicoFeed\Reader\Reader;

$reader = new Reader;
$resource = $reader->download('http://linuxfr.org/news.atom');

$parser = $reader->getParser(
    $resource->getUrl(),
    $resource->getContent(),
    $resource->getEncoding()
);

$feed = $parser->execute();

echo $feed;

Documentation

 

 

 

Main metrics

Overview
Name With Ownernicolus/picoFeed
Primary LanguagePHP
Program languagePHP (Language Count: 2)
Platform
License:MIT License
所有者活动
Created At2017-09-16 16:06:07
Pushed At2023-03-23 01:54:44
Last Commit At2021-01-13 07:02:41
Release Count43
Last Release Name1.0.0-rc1 (Posted on )
First Release Namev0.0.1 (Posted on )
用户参与
Stargazers Count34
Watchers Count3
Fork Count16
Commits Count847
Has Issues Enabled
Issues Count5
Issue Open Count5
Pull Requests Count23
Pull Requests Open Count2
Pull Requests Close Count3
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private