library rss-agent
Package to read the RSS Feeds from URL according RSS v2 standards (https://validator.w3.org/feed/docs/rss2.html)
skydriver/rss-agent
Package to read the RSS Feeds from URL according RSS v2 standards (https://validator.w3.org/feed/docs/rss2.html)
- Friday, October 23, 2015
- by SkyDriver
- Repository
- 1 Watchers
- 0 Stars
- 8 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Version 1.0.0, (*1)
Package to read the RSS Feeds from URL according RSS v2 standards (https://validator.w3.org/feed/docs/rss2.html)., (*2)
Install
This package can be found on packagist and is best loaded using composer., (*3)
Usage
require_once __DIR__ . '/vendor/autoload.php';
use RssAgent\RssAgent;
$url = 'https://packagist.org/feeds/packages.rss';
$rss = new RssAgent( $url );
if( $rss->feeds() ):
// You can get every feed channel property
printf(
'
Feed from %s
',
$url,
$rss->title
);
foreach($rss->feeds() as $feed):
// You can cat every feed property
printf(
'<div class="feed-item">
<a href="%s" target="_blank">%s</a>
<p>%s</p>
</div>',
$feed->link,
$feed->title,
$feed->description
);
endforeach;
endif;