programster/rss-feed
Composer 安装命令:
composer require programster/rss-feed
包简介
A package to make creating an RSS feed easy.
关键字:
README 文档
README
A package to make generating an RSS 2.0 feed easy and straightforward.
Installation
composer require programster/rss-feed
Example Usage
<?php require_once(__DIR__ . '/vendor/autoload.php'); use Programster\RssFeed; $items = array(); $pubDate = new DateTime(); $pubDate->setTimestamp(1534698676); $items[] = new RssFeed\RssItem( "Article Title", "https://blog.mydomain.org/path/to/article", "A description of the article goes here.", $pubDate, "my-article-category" ); // .. add another item, and another, and another... $channel = new RssFeed\RssChannel( "My Awesome Blog", "https://blog.mydomain.com", "Tutorials on This and That", "en", new RssFeed\NullRssImage(), ...$items ); $rss = new RssFeed\RssFeed($channel); header('Content-type: application/xml'); echo $rss;
Useful Links
统计信息
- 总下载量: 181
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-08-19