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
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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

I did figure that out, and now I come across the & issue. I change that to '&#38;' 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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.