Dville Posted July 25, 2006 Share Posted July 25, 2006 So I've been doing this digg clone, and would like to be able to publish RSS feeds. I looked around google and see the template for rss feeds. . .but none are 'automated'. So if someone were to add an article(at http://digg.sytes.net/digg), I would have to update the xml file. How can I make this 'automated/mysql' based? I thought it would be a simple mysql query with a limit of 10 or however many articles i wanted the rss feed to limit to. But I can't find anything that says this.Anyone have a site/tutorial that has a good explaination of how to do this. Thanks in advanced. Quote Link to comment https://forums.phpfreaks.com/topic/15631-automated-rss-publisher/ Share on other sites More sharing options...
Dville Posted July 25, 2006 Author Share Posted July 25, 2006 I have now found how to do this. . .but see a couple issues.1 - it doesnt update unless I run the file. So the xml file doesn't update unless I personally go to /digg/update_rss.php. How can this be automated.2 - I get a validation error.[code]1. pubDate must be an RFC-822 date 15 352. XML Parsing error: <unknown>:26:20: not well-formed (invalid token) 26 20[/code]when i open the xml file in IE i get[code]Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later. --------------------------------------------------------------------------------Whitespace is not allowed at this location. Error processing resource 'file:///C:/www/digg/rss.xml'. Line 26, Position 21 <title> Search & Share</title>[/code]So yea, if anyone knows of a tutorial, or anything that could assist me in these validation errors I would greatly appreciate it. Quote Link to comment https://forums.phpfreaks.com/topic/15631-automated-rss-publisher/#findComment-63717 Share on other sites More sharing options...
ShogunWarrior Posted July 25, 2006 Share Posted July 25, 2006 Make sure your date format is the correct one, for example if you have it as mm/dd/yy h:i:s instead of dd, mm/yy h:i:s then it will throw an error.Note:only an example, you'll have to look up the proper format.You can use [b]strtotime[/b] and [b]date[/b] to reformat dates. Quote Link to comment https://forums.phpfreaks.com/topic/15631-automated-rss-publisher/#findComment-63720 Share on other sites More sharing options...
Dville Posted July 25, 2006 Author Share Posted July 25, 2006 I did figure that out, and now I come across the & issue. I change that to '&' and that fixes that. Wouldnt there be some sort of parser, that will automaticly change these things. Instead of me having to change them from the database. Quote Link to comment https://forums.phpfreaks.com/topic/15631-automated-rss-publisher/#findComment-63728 Share on other sites More sharing options...
ShogunWarrior Posted July 26, 2006 Share Posted July 26, 2006 You can use [b]htmlspecialchars_decode()[/b] Quote Link to comment https://forums.phpfreaks.com/topic/15631-automated-rss-publisher/#findComment-64179 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.