FeedFinder

Contents

[ hide ]

    class FeedFinder is a utility class that FeedWordPress uses to find the best options for feed URLs associated with a given URL. If the content at the given URL appears a feed, then FeedFinder will return the URL itself. If the content at the given URL appears to be a human-readable web page, FeedFinder will attempt to use standard feed auto-discovery techniques and return the URLs of any feeds that appear to be associated with the page.

    Example

    $ff = new FeedFinder($lookupUrl);
    

    $foundFeeds = $ff->find(); if (count($foundFeeds) > 0) : foreach ($foundFeeds as $url) :

    // Make sure this is a working URL not an HTTP error if (!is_wp_error($url)) : /* Do something with the URL in $url . . . */

    // The first url ($foundFeeds[0]) is likely to be the best candidate // After we've made use of the first available, get out of this loop. break; endif; endforeach; endif;
    This page is a Wiki! Log in or register an account to edit.

    Leave a Reply

    Your email address will not be published. Required fields are marked *