2017 © Pedro Peláez
 

library website-rss-feed-finder

Find the RSS feed from a given website base URL

image

webignition/website-rss-feed-finder

Find the RSS feed from a given website base URL

  • Thursday, May 10, 2018
  • by webignition
  • Repository
  • 3 Watchers
  • 10 Stars
  • 10,904 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 12 Versions
  • 2 % Grown

The README.md

Website RSS/ATOM Feed Finder Build Status

Overview

Finds the RSS or ATOM feed URL for a given website. That's all., (*1)

Usage

The "Hello World" example

<?php
$finder = new webignition\WebsiteRssFeedFinder\WebsiteRssFeedFinder();        

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

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

Building

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., (*2)

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

Developing

This project has external dependencies managed with [composer][3]. Get and install this first., (*3)

# 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

Testing

Have look at the [project on travis][4] for the latest build status, or give the tests a go yourself., (*4)

cd ~/website-rss-feed-finder
phpunit

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

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., (*6)

The Versions

19/03 2018