casivaagustin/feedtcher
Composer 安装命令:
composer require casivaagustin/feedtcher
包简介
Gets ATOM and RSS Feeds
README 文档
README
Library for fetch RSS and ATOM Feeds
How to use it
Just add this library to your composer.json, or set the paths for your autoloader. Add PHRequests and HTML Purifier as dependency also.
And just do something like this in your code.
$url = 'http://casivaagustin.com.ar/?feed=rss2'; $feed = Feedtcher\Feedtcher::fetch($url);
This will return a Feed Object with a collection of Entries. Feed does not have all the possible entries from the feed, it just fetch.
- Title
- Description
- Link
- Date
- Author
And Entries have
- Title
- Description
- Author
- Date
- Link
To get Feed fields just read as attributes.
$feed->title ... $feed->link ...
And for Entries use the feed object as array
$feed[0]->title ... $feed[0]->description ... $feed[0]->author ...
Works with RSS and ATOM.
That is all !
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-04-05