Dynamic filename for RSS feed

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
andrewgerm
Forum Newbie
Posts: 1
Joined: Tue Aug 23, 2011 1:31 pm

Dynamic filename for RSS feed

Post by andrewgerm »

Good day all

I'm busy creating some code for a dynamic RSS feed for my website users. I'd like to have a link to this appear on their personal pages.

I've got the base code for retrieving the data from the DB, and outputting the XML (although I want to change this from basic array at a stage to something better).

What I'd like to have, is to have the RSS link on their pages point to a personal URL / filename.

What would be best? Create a unique filename dynamically for each member (and how?). Or use mod rewrite and place this below their personal URL?

Any comments / suggestions welcome.

Thank you in advance :)
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Dynamic filename for RSS feed

Post by Jade »

Why not do something like rssfeed.php?user=username and then you can $_GET the username (but escape it before you use it in your code) and generate their RSS data from there. Then you only need one file for everyone.
Post Reply