Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.