05-28-2006, 08:30 PM
anyone know a way to generate valid rss files from dynamic (php/mysql) web pages? and if not, maybe we could say - rss from plain old html.
rss from dynamic page?
|
05-28-2006, 08:30 PM
anyone know a way to generate valid rss files from dynamic (php/mysql) web pages? and if not, maybe we could say - rss from plain old html.
05-28-2006, 09:05 PM
Create a separate file called "indexrss.php" (or whatever)
Iterate over your mysql results and create the xml instead of html. You will need to set the content type to xml with a header('Content-type: text/xml') directive. Optionally, you can add to your HTML page's head section.
05-28-2006, 10:21 PM
Ah, Seacrest...you make it all look so simple.
You are my web design hero! (really!)
05-29-2006, 09:19 AM
Seacrest is the champion, for sure.
But your humble servant doesn't quite understand the header('Content-type: text/xml') bit if under normal circumstances, a file called feed.rss begins with: do you mean that this should be placed on the first line, above those two lines?: ;
05-29-2006, 12:53 PM
eh
I figured it out... this goes first: then: any queries/other php header stuff then: while deliberately leaving out this:
05-29-2006, 06:10 PM
All headers must be sent before any data is output to the browser, so yeah.
|
« Next Oldest | Next Newest »
|