Created
May 15, 2013 02:34
-
-
Save johntron/5581284 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$feed = $this->get('feed_parser'); // This is just a SimplePie object | |
$feed->set_feed_url('http://feeds.feedburner.com/lolcats/rss'); | |
$feed->init(); | |
$items = $feed->get_items(); | |
$item = $items[array_rand($items)]; | |
$item = $item->get_content(); | |
$item = substr($item, 0, strpos($item, 'Posted by')); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment