harlequin2k5
10-02-2007, 12:24 AM
I went through a few different tutorials for creating a dynamic rss feed and I found this one by tiffany brown (http://www.tiffanybbrown.com/2005/12/22/dynamic-rss-feeds-using-php-mysql-and-apache) to be most helpful
unfortunately I'm doing something wrong and not being well-versed with xml at all I'm not sure what to do next
I get that nasty lil parse error and considering that the first line is
<?xml version="1.0" encoding="utf-8"?>
I didn't know what to do first
this is my feed - there are currently 3 articles that it can display:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Shopping Center Advisor</title>
<link>http://www.shoppingcenter-advisor.com/test</link>
<description>The definitive source for Shopping Center Information</description>
<language>en-us</language>
<managingEditor>webmaster@shoppingcenter-advisor.com</managingEditor>
<webMaster>webmaster@shoppingcenter-advisor.com</webMaster>
<copyright>2007 Ronald L. McDonald</copyright>
<?
include('functionlist.php');
$conn=doconnect();
$query = "SELECT id,title,content,DATE_FORMAT(added,'%c/%e/%y') as added FROM articles order by added desc limit 5";
$result = mysql_query($query) or die("Error: " . mysql_error());
while ($row = mysql_fetch_array($result))
{
?>
<item>
<title> <?=htmlentities(strip_tags($row['title'])); ?></title>
<description> <?=htmlentities(strip_tags($row['content'],'ENT_QUOTES'));?></description>
<link>http://www.shoppingcenter-advisor.com/test/articles.php?p=<?=$row['id'];?></link>
</item>
<? } ?>
</channel>
</rss>
unfortunately I'm doing something wrong and not being well-versed with xml at all I'm not sure what to do next
I get that nasty lil parse error and considering that the first line is
<?xml version="1.0" encoding="utf-8"?>
I didn't know what to do first
this is my feed - there are currently 3 articles that it can display:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Shopping Center Advisor</title>
<link>http://www.shoppingcenter-advisor.com/test</link>
<description>The definitive source for Shopping Center Information</description>
<language>en-us</language>
<managingEditor>webmaster@shoppingcenter-advisor.com</managingEditor>
<webMaster>webmaster@shoppingcenter-advisor.com</webMaster>
<copyright>2007 Ronald L. McDonald</copyright>
<?
include('functionlist.php');
$conn=doconnect();
$query = "SELECT id,title,content,DATE_FORMAT(added,'%c/%e/%y') as added FROM articles order by added desc limit 5";
$result = mysql_query($query) or die("Error: " . mysql_error());
while ($row = mysql_fetch_array($result))
{
?>
<item>
<title> <?=htmlentities(strip_tags($row['title'])); ?></title>
<description> <?=htmlentities(strip_tags($row['content'],'ENT_QUOTES'));?></description>
<link>http://www.shoppingcenter-advisor.com/test/articles.php?p=<?=$row['id'];?></link>
</item>
<? } ?>
</channel>
</rss>