How to get the last news from a blog (any blog)

This tutorial will show us how to get the last news of a blog and put it on our site. We may have the case when our site is not fully driven by a blog engine, but we have one, so we want to put on the ‘News’ section the last posts, or we want to grab other’s news feeds and display it on our site.

First step is to download the script built by rborn development, from here. It is a script that is very easy to use, based on LastRSS but changed a little to overcome the restrictive security settings found on many servers related to fopen.
Just include the news_reader.php in the place where you want the news to be. Then edit the file, setting the number of posts and url to grab.

//——– settings ——–

$rssurl = ‘http://feeds.feedburner.com/Cssgalleryinfo’;
$nr = 5;
//————————-

After this you may want to skin this section, because the script is just raw text, this way everybody to be able to skin according to it’s design.

Here is an example, with raw result and a skinned one.

Leave a Reply