Launch Asherons Call Dark Majesty

ACHeaven's Sample Code
for Live RSS Feeds


Would you like a LIVE RSS feed of the Plugin Updates to your Web Site?
If so, click the
button and add the XML code to your Website.

If you don't know how to add a Live RSS feed search Google for "PHP RSS parse"
or use
the following code as a framework for setting it up on your site.

This example code uses Magpie RSS, but it should not be much different for others.

<?php /* -------- ACHeaven's Latest Decal Plugin Updates -------- */
require_once('../magpierss/rss_fetch.inc');
$url = 'http://acheaven.buwahaha.com/pluginupdatesrss.xml';
$datafeed = '';
if ($rss = @fetch_rss($url)) {
       
$datafeed .= "\n\n" . '<h4 style="margin-bottom:0px;">';
       
$datafeed .= '<a href="' . $rss->image['link'] . '"><img';
       
$datafeed .= ' sr
c="' . $rss->image['url'] . '" border="0" alt="';
       
$datafeed .= $rss->image['title'] . '" align="left"></a></h4>';
       
$datafeed .= "\n" . '<p style="margin-top:0px;">';
       
$datafeed .= $rss->channel['description'] . '</p>';
       
$datafeed .= '<br style="clear:both;" /><br />';
       
foreach ($rss->items as $item) {
               
$datafeed .= "\n\n" . '<h5 style="margin-bottom:0px;">';
               
$datafeed .= '<a href="' . $item['link'] . '">';
               
$datafeed .= $item['title'] . '</a>';
               
$datafeed .= ' <small>(' . $item['pubdate'] . ')</small></h5>';
               
$datafeed .= "\n" . '<p style="margin-top:0px;"><small>';
               
$datafeed .= $item['description'] . '</small></p>';
       
}
       
echo $datafeed;
} else echo 'File could not be fetched.';
/* ----------------------------------------------------------- */ ?>

Valid RSS feed.
Check your own Code using
the
RSS Feed Validator.

The only thing that would need to be adjusted is where to find the RSS script.
and this, of course, would then be added to a regular web page.


This page was last modified