lib16/rss 问题修复 & 功能扩展

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

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

lib16/rss

Composer 安装命令:

composer require lib16/rss

包简介

lib16 RSS Builder is a PHP 7 library for creating RSS feeds.

README 文档

README

A library for creating RSS feeds written in PHP 7.

Build Status Coverage

Installation with Composer

This package is available on packagist, so you can use Composer to install it. Run the following command in your shell:

composer require lib16/rss

Basic Usage

Example markup is taken from en.wikipedia.org/wiki/Rss

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

use Lib16\RSS\Channel;
use Lib16\RSS\RssMarkup;

$channel = Channel::create(
    'RSS Title',
    'This is an example of an RSS feed',
    'http://www.example.com/main.html'
);
$channel
    ->pubDate(new DateTime('2010-09-06 00:01 +0'))
    ->lastBuildDate(new DateTime('2009-09-06 16:20 +0'))
    ->ttl(1800);

$channel
    ->item(
        'Example entry',
        'Here is some text containing an interesting description.',
        'http://www.example.com/blog/post/1'
    )
    ->guid('7bd204c6-1655-4c27-aeee-53f933c5395f', false)
    ->pubDate(new DateTime('2009-09-06 16:20 +0'));

RssMarkup::headerfields('example');
print $channel;

… generates the following output:

<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
    <channel>
        <title>RSS Title</title>
        <description>This is an example of an RSS feed</description>
        <link>http://www.example.com/main.html</link>
        <pubDate>Mon, 06 Sep 2010 00:01:00 +0000</pubDate>
        <lastBuildDate>Sun, 06 Sep 2009 16:20:00 +0000</lastBuildDate>
        <ttl>1800</ttl>
        <item>
            <title>Example entry</title>
            <description>Here is some text containing an interesting description.</description>
            <link>http://www.example.com/blog/post/1</link>
            <guid isPermaLink="false">7bd204c6-1655-4c27-aeee-53f933c5395f</guid>
            <pubDate>Sun, 06 Sep 2009 16:20:00 +0000</pubDate>
        </item>
    </channel>
</rss>

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固