Welcome to WebmasterWorld Guest from

Forum Moderators: bill & werty

Message Too Old, No Replies

Rss + Php?

1:45 am on May 10, 2004 (gmt 0)

Preferred Member

10+ Year Member

joined:Apr 16, 2004
votes: 0

what's the best way to go about this, if the info is pulled from a database and you use php?

if the feed is otherwise valid, but has a php extention, is that okay?

2:13 am on May 10, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 11, 2003
votes: 0

Yeah, that usually works.

And if I'm not mistaken, PHP/Post nuke does the same thing.

I've never seen a problem with this as long as it validates/works in parser's.


6:48 am on May 10, 2004 (gmt 0)

Senior Member from ES 

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 11, 2003
votes: 0

In a bit of a 'blog' script I threw together for a client, I generated an RSS 2.0 feed using PHP and mySQL. I deliver it using this in my htaccess file:

RewriteRule ^path/to/file/rssfeed.xml$ rss_feed.php [L]

No idea if I named that right etc. but it works and gets spidered. I think I have it zipped too, not that it should need it, just the site wrapper has it on...

1:23 am on May 16, 2004 (gmt 0)

New User

10+ Year Member

joined:Feb 9, 2004
votes: 0

The 'clever' way to do this, ie my way, is to add .xml to the list of pages that PHP parses in the Apache httpd.conf file. Then you can have the .xml extension for your RSS feed with PHP.
5:34 pm on May 31, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:May 6, 2004
votes: 0

or I guess you could just add..

header("content-type: application/rss+xml");

to the top of your php