Find the RSS feed from a given website base URL

2.2 2019-04-03 15:38 UTC

This package is auto-updated.

Last update: 2021-12-31 00:22:02 UTC



Finds the RSS or ATOM feed URL for a given website. That's all.


The "Hello World" example

$finder = new webignition\WebsiteRssFeedFinder\WebsiteRssFeedFinder();        

$this->assertEquals('http://feeds.feedburner.com/codinghorror/', $finder->getRssFeedUrl());

$this->assertEquals('http://www.geekyportal.com/feeds/posts/default', $finder->getAtomFeedUrl());        


Using as a library in a project

If used as a dependency by another project, update that project's composer.json and update your dependencies.

"require": {
    "webignition/website-rss-feed-finder": "*"      


This project has external dependencies managed with composer. Get and install this first.

# Make a suitable project directory
mkdir ~/website-rss-feed-finder && cd ~/website-rss-feed-finder

# Clone repository
git clone git@github.com:webignition/website-rss-feed-finder.git.

# Retrieve/update dependencies
composer.phar install


Have look at the project on travis for the latest build status, or give the tests a go yourself.

cd ~/website-rss-feed-finder

An instance of WebsiteRssFeedFinder can be passed an HTTP client with which to retrieve the content of the specified sitemap URL.

Examine the existing unit tests to see how you can pass in a mock HTTP client to enable testing without the need to perform actual HTTP requests.