Page is a not externally linkable
j2trumpet - 9:19 pm on Apr 11, 2009 (gmt 0)
1) Have your Blogger feed settings set to publish short summaries of your posts (default is full). 2) Download MagpieRSS (I used version 0.72) to your server and place its files in a directory called "magpierss" at the same directory level of the PHP page that will display your feed. 3) Copy/paste the code below into the PHP page that will display your feed: ---------- <?php $rss = fetch_rss( 'YourAbsoluteFeedURL/atom.xml' ); /* Uncomment the following line to see the object and array data returned. Good to see which other information has been processed by magpierss */ //display latest blog content: ---------- 4) Change the echo portions of the code above to display your feed with whatever HTML you want. 5) Open "magpierss/rss_fetch.inc" and find line #350. 6) Change the "60*60" to equal how frequently (in seconds - default 1 hour) you want the feed to look for new posts. I set mine to 1*60 (1 minute). Note) If you want to display other information (author, timestamp, etc.), un-comment the echo line in the code above to see what information is available. That's it! I hope my time spent figuring all this out can be a benefit to someone else. [edited by: j2trumpet at 9:43 pm (utc) on April 11, 2009]
Thanks everyone for the help, but I found a solution on my own and here it is for anyone looking at this post later on.
define('MAGPIE_DIR', 'magpierss/');
require_once(MAGPIE_DIR.'rss_fetch.inc');
// echo "<pre>"; print_r($rss); echo "</pre>";
$blog_title = $rss->channel[title];
$item = $rss->items[0];
$title = $item['title'];
$content = $item['summary'];
echo "<div class='latest_news' style='background-color: #ffffff;'>\n";
echo "<h3>$blog_title</h3>\n";
echo "<p><strong>$title</strong><br />$content...</p>\n";
echo "<p style='margin-bottom: 0px; text-align: right; padding-right: 50px;'><a href='#'>Read more >></a>\n";
echo "</div>";
?>