RSS Grabing Code

Grab any RSS from another domain and publish it in any fashion you wish on your Dreamscape CMS website.

//RSS grabbing code
$rss = new easyRSS;
function get_feeds($feed, $loop_name, $limit=10){
global $rss;
$news = array('items'=>array());
$feed_file = getRemoteFile($feed);
$news = $_SESSION[$loop_name] = $rss->parse($feed_file->results, "Y-m-d H:i:s");
} else {
$news = $_SESSION[$loop_name];
$content = array();
$news['items'] = array_slice($news['items'], 0, $limit);
foreach($news['items'] as $k => $v){
$content[] = (object) $v;
add_loop($content, $loop_name);

Then call the above script by adding the loop:

add_loop('http://blog.iantearle.com/feed.php?feed=atom', 'blog_rss');

Posted On: Friday, February 13th, 2009 @ 6:06 pm by Ian Tearle


There are no comments on this entry. You should add one below.

Leave a comment

Be kind

If you would like to discuss anything about this post, please be polite and add your comments below.



No HTML is allowed. All links, and new lines will be automagically converted to HTML for you.
Notice to spammers, all links will be sanitized with rel="nofollow".

Contact Me

Get In Touch

If you would like to discuss anything about your next project please drop me a line.



Projects start at £99.00 per month
We normally book 2–3 months in advance.


No matter how small your project is, or if the prices above scare you, please do get in touch, I shall always listen and will advise freely alternative ideas or solutions. If you are a charity, let's talk!

Find Me On