1

Are there any scripts or classes available in PHP that can allow me to define different RSS feeds to have them output on a page ordered by date?

I want a page that will have RSS feeds parsed from multiple source bundled together but sorted by date.

1 Answer 1

2

One script that can do this is SimplePie. See Sort multiple feeds by time and date.

// Create a new SimplePie object
$feed = new SimplePie();

// Instead of only passing in one feed url, we'll pass in an array of three
$feed->set_feed_url(array(
    'http://digg.com/rss/index.xml',
    'http://feeds.tuaw.com/weblogsinc/tuaw',
    'http://feeds.uneasysilence.com/uneasysilence/blog'
));

// Initialize the feed object
$feed->init();

// This will work if all of the feeds accept the same settings.
$feed->handle_content_type();

foreach ($feed->get_items() as $item) {
    $item->get_title(), "\n"; 
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.