Jump to content

automated rss publisher


Dville

Recommended Posts

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.
Link to comment
https://forums.phpfreaks.com/topic/15631-automated-rss-publisher/
Share on other sites

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 35
2. 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.
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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.