Welcome Guest, Not a member yet? Register   Sign In
Wierd rss problem
#1

[eluser]ppwalks[/eluser]
I have followed some instructions on creating an rss feed for my website, I followed the tutorial on net tuts and created a feed in another folder on wamp which works fine, but when I move the files accross to the site I am making the website I cannot view the feed it wants me to download it, this is a new problem that I have never encountered, any help would be appreciated.

controller code

Code:
class Feed extends Controller {

      function Feed()
      {
  parent::Controller();
   $this->load->helper('xml');  
        $this->load->helper('text');  
      }
       function index()  
    {  
        $data['feed_name'] = 'MyWebsite.com'; // your website  
        $data['encoding'] = 'utf-8'; // the encoding  
           $data['feed_url'] = 'http://localhost/feed'; // the url to your feed  
           $data['page_description'] = 'What my site is about comes here'; // some description  
           $data['page_language'] = 'en-en'; // the language  
           $data['creator_email'] = '[email protected]'; // your email  
           header("Content-Type: application/rss+xml"); // important!  
       $this->load->view('rss', $data);  
    }  
}

View code

[code]
<?php  echo '<?xml version="1.0" encoding="' . $encoding . '"?>' . "\n"; ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:content="http://purl.org/rss/1.0/modules/content/">  
  
        <channel>
        &lt;link&gt;&lt;?php echo $feed_url; ?&gt;  
        <description>&lt;?php echo $page_description; ?&gt;</description>  
        <dc:language>&lt;?php echo $page_language; ?&gt;</dc:language>  
        <dc:creator>&lt;?php echo $creator_email; ?&gt;</dc:creator>  
  
        <dc:rights>Copyright &lt;?php echo gmdate("Y", time()); ?&gt;</dc:rights>  
        <admin:generatoragent rdf:resource="http://www.codeigniter.com/">  
  
        &lt;?php foreach($posts->result() as $post): ?&gt;  
  
            <item>  
&lt;link&gt;&lt;?php echo site_url('blog/posting/' . $post->id) ?&gt;  
              <guid>&lt;?php echo site_url('blog/posting/' . $post->id) ?&gt;</guid>  
  
                <description>&lt;!--[CDATA[ &lt;?php echo character_limiter($post->text, 200); ?&gt; ]]></description>  
<pubdate>&lt;?php echo $post->date; ?&gt;</pubdate>  
            </item>  
  
        &lt;?php endforeach; ?&gt;  
  
        </admin:generatoragent>
</channel></rss>

Can anyone please explain why this is happening, like I said earlier it loads fine in its own codeigniter directory but loading inside my current project does this.

Any help would be asppreciated...


Messages In This Thread
Wierd rss problem - by El Forum - 01-23-2012, 11:48 AM
Wierd rss problem - by El Forum - 01-28-2012, 07:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB