This job should be really easy for someone who knows what they are doing.
There is a file single php file on my article directory which controls all the RSS feeds. The problem is that the feed is incomplete and does not contain all the data I want it to. Also, certain charators like ‘ and – display as ’s and –
I need someone to fix this problem get add the required additional feed items to display and deliver a W3C Vaild RSS feed. (validator.w3.org/feed/)
The feeds render a default meta and feed title and decsription in every instance, I want them to display title that is relevant to the feed being displayed. IE, the Heath and Fitness feed displays Health and fitness feed.
The additional fields that need to display are
<author> </author>
<category> </category>
I have added these 2 and they do display when one views the source code of the feed, but not on the feed itself, not are they passed to any feed reader.
Here is an extract from the code if it helps.
$strxml = $strxml.”<title>”.getsettings(2,”",2).” Articles</title>”;
$strxml = $strxml.”<link>”.getsettings(3,”",2).”/articlerss.php?type=”.$_GET["type"].”&category=”.$_GET["category"].”</link>”;
$strxml = $strxml.”<description>Latest Articles </description>”;
$strxml = $strxml.”<language>en-us</language>”;
$strxml = $strxml.”<copyright>Copyright (c) “.getsettings(2,”",2).” All rights reserved.</copyright>”;
echo $strxml; flush();
$j=0;
while($rs=mysql_fetch_array($cmd))
{
// $url=getsettings(3,”",2).”/article” . $rs["article_id"] . “-” . urlencode($rs["article_title"]) . “.html”;
$url=getsettings(3,”",2).”/article” . $rs["article_id"] . “-” . urlencode(preg_replace(‘/[^a-zA-Z0-9s!?"']+/’,'_’,$rs['article_title'])) . “.html”;
$out=”<item>n”;
$out .= “<title>”.removechar(htmlentities(strip_tags($rs["article_title"]))).”</title>n”;
//$out .= “<link>”.preg_replace(‘/[^a-zA-Z0-9s!?"']+/’,'_’).str_replace(“ ”, “”, strip_tags($url)).”</link>n”;
//$out .= “<link>”.preg_replace( ,’3F’,preg_replace(‘/[^a-zA-Z0-9s.-:/+!?"']+/’,'_’, $url)).”</link>n”;
$out .= “<link>”.$url.”</link>n”;
$out .= “<author>”.removechar(htmlentities(strip_tags($rs["article_author"]))) . “</author>n”;
$out .= “<category>”.removechar(htmlentities(strip_tags($rs["category_name"]))) . “</category>n”;
$out .= “<description>”.removechar(htmlentities(strip_tags($rs["article_snippet"]))) . “</description>n”;
$out .= “<pubDate>” . date(‘r’,strtotime($rs["article_date"])) . “</pubDate>”;
$out .= “</item>n”;
echo $out; flush();
$j=$j+1;
if($j >= 50) break;//limit !
}
$strxml = “</channel>n”;
$strxml = $strxml.”</rss>n”;
echo $strxml; flush();