Jump to content

RSS Help


spires

Recommended Posts

Hi, I have created a RSS Feed on my website.

But for some reason, when I go to the URL, it just displays the contents of the rss on the screen,

rather that taking the user to the actual RSS feed, where they can join?

 

URL:

http://businessgrowthinternational.co.uk/rss.xml

 

<?PHP 
require_once('includes/initialize.php');
$lastBlog = Blog::find_last_posted();
$blogDateMod = $lastBlog->dateMod;
echo '
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<atom:link href="http://www.businessgrowthinternational.co.uk/rss.xml" rel="self" type="application/rss+xml" />
<title>Business Growth Internation</title>
<link>'.SITE_DOMAIN.DS.'blog_list</link>
<description>Learn the of Business & Personal Success. Business Growth Internation will give you all the tools you need to succeed. Join now and start receiving your FREE Tips.</description>
<language>en-us</language>';

  $blogCat = Blog::find_all_order_by('position', 'ASC');
  foreach($blogCat as $blogCats){
	  $ID = $blogCats->id;
	  $title = ucwords($blogCats->title);
	  $sub_title = ucwords($blogCats->sub_title);
	  $blogDateMod = $blogCats->dateMod;
	  $blogTimeMod = $blogCats->timeMod;
	  $rss_date = date("r", strtotime($blogDateMod));
	  echo '
		<item>
		<title>'.$title.'</title>
		<link>'.make_blog_url('tips', $ID, $title).'</link>
		<description>'.$sub_title.'</description>
		<pubDate>'.$rss_date.'</pubDate>
		</item>';
  }
  
echo '
</channel>
</rss>';
?>

Link to comment
https://forums.phpfreaks.com/topic/238684-rss-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.