Thursday, 8 August 2013

cant get the rss to work as valid feed

cant get the rss to work as valid feed

so everything seems to be fine
this is the address
http://mimjob.com/news/rss
this is the source
<?php ob_start(); echo'<?xml version="1.0" encoding="utf-8" ?>' . "\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>
<title><?php echo $feed_name; ?> </title>
<link><?php echo $feed_url; ?> </link>
<description><?php echo $page_description; ?></description>
<dc:language><?php echo $page_language; ?></dc:language>
<dc:creator><?php echo $creator_email; ?></dc:creator>
<dc:rights>Copyright <?php echo gmdate("Y", time()); ?></dc:rights>
<admin:generatorAgent rdf:resource="http://www.mzksh.com/" />
<?php foreach($news->result() as $n): ?>
<item>
<title><?php echo xml_convert($n->title); ?></title>
<link><?php echo base_url('news/get/' . $n->id) ?></link>
<guid><?php echo base_url('news/get/' . $n->id) ?></guid>
<description><![CDATA[<?php echo
character_limiter($n->text, 200); ?>]]></description>
<pubDate><?php echo $n->date;?></pubDate>
</item>
<?php endforeach; ?>
</admin:generatoragent>
</channel>
</rss>
<?php
$output = ob_get_contents();
ob_end_clean();
echo $output;
?>
ive added the ob_start to remove empty spaces but still cant get it to
work and no , there is no white space befor
i'm using codeigniter framework but i don't think that's relevant

No comments:

Post a Comment