承接 joelwmale/rss-feed-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

joelwmale/rss-feed-php

Composer 安装命令:

composer require joelwmale/rss-feed-php

包简介

RSS Feeds for PHP is a very small, lightweight, and easy-to-use library for consuming an RSS feed.

README 文档

README

travis build License: MIT

RSS Feeds for PHP is a very small, lightweight, and easy-to-use library for consuming an RSS feed.

It requires PHP 7.1 or newer with cURL installed on the system, and is licensed under the MIT License.

Installation

Composer:

composer require joelwmale/rss-feed-php

Usage

Download RSS feed from URL:

use joelwmale\RSSFeedPHP;

$feed = RSSFeedPHP::load($url);

Elements are returned as SimpleXMLElement objects, with the outter most object being an std::class.

echo 'Title: ', $feed->title;
echo 'Description: ', $feed->description;
echo 'Link: ', $feed->link;

foreach ($feed->item as $item) {
	echo 'Title: ', $item->title;
	echo 'Link: ', $item->link;
	echo 'Date: ', $item->date;
	echo 'Description ', $item->description;
	echo 'HTML encoded content: ', $item->{'content:encoded'};
}

A helper class is available if you wish to convert it to an array instead:

use joelwmale\RSSFeedPHP;

$feed = RSSFeedPHP::load($url);
$feed->toArray();

Caching is available by adding the following:

use joelwmale\RSSFeedPHP;

RSSFeedPHP::$cacheDir = __DIR__ . '/tmp';
RSSFeedPHP::$cacheExpire = '5 hours';

Testing

Tests are run via phpunit:

phpunit

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固