/    Sign up×
Community /Pin to ProfileBookmark

advice creating RSS feed with PHP

Hi there,

I am creating a blog (for learning purposes) that uses PHP to write to an RSS feed. each individual blog is actually an <item> element in the XML file.

I am using DOMDocument to create the XML using the data I grab from the POST, it all works real nice but this is where I am hung up. The DOMDocument creates the <xml …. > tag at the top.

Is there a way to surpress this so that I can take the XML I have created write it into the .XML file that is the RSS feed? Or is the best way to handle it just by removing that first line?

Maybe there is a totally better way to do this? Any advice would be great.

Thanks!

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@r0k3tauthorJan 12.2009 — Hi there,

Is this question just so obvious that everyone is like "I won't even bother to comment"... I am just looking for suggestions - you mean there isn't anyone on this board that hasn't written an RSS feed using PHP?

Thanks
×

Success!

Help @r0k3t spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...