PDA

View Full Version : RSS Feeds - Best practice


cocoonfx
03-28-2009, 01:14 PM
Hello Chaps


I have an RSS feed which i am really not happy with, and i would like to enhance the process of updating it. At the moment i manually code the updates.

I was wondering what is the best process to create and RSS feed? I am using XML at the moment, and everytime i update it i send hours have to tweak it to get it to work.

Is there a way i can connect the RSS feed to a MySQL database and use a form to update the feed?

edbr
03-30-2009, 02:17 AM
sore point at the moment.
i was using php and adding an htaccess addtype so the server read xml as php.recently changing server and this no longer works!! as i see it the only option is to use php and fwrite to write a new xml page i havent got around to it yet but im fairly sure this will be the way

domedia
03-30-2009, 04:03 AM
I'm no programmer, but since it all happens serverside why not use PHP and some of it's classes related to this to build it.

edbr
03-30-2009, 04:22 AM
ill let you know when i get back to it. it can definitely be done using php .
i did it before like this

in the .htaccessAdd AddType application/x-httpd-php .xml

then my page 9page.xml)<rss version="2.0">
<channel>
<title>Blah blah</title>
<description>Blah blah</description>
<link>http://Blah blah.com/</link>
<?
include('../db.php');

$q="select field1, field2,field3, salary, UNIX_timestamp(datenow) as datenow from `table` order by salary DESC limit 15";
$doGet=mysql_query($q);

while($result = mysql_fetch_array($doGet)){

?>

<item>
<title> <?=htmlentities(strip_tags($result['field1'])); ?></title>
<description> <?=htmlentities(strip_tags($result['field2], 'ENT_QUOTES'));?></description>

<link>http://www./Blah blah.com/rss/Detail.php?id=<?=$result['field1''];?></link>


<pubDate><?=date('D, d M Y H:i:s O',$result['datenow']);?></pubDate>

</item>
<? } ?>

</channel>
</rss>

cocoonfx
04-03-2009, 11:36 AM
OK thanks guys i think i will explore using PHP.

Is there anyone software (free) which can do quickly build this.

edbr
04-04-2009, 01:36 AM
doubt it, at least never seen it.