Welcome to WebmasterWorld Guest from 54.234.153.186

Forum Moderators: bill & werty

Message Too Old, No Replies

Putting RSS of my PhP Forum on HTML Page?

     

HappyMomAnna

5:29 am on Oct 14, 2006 (gmt 0)

5+ Year Member



I'm not sure if this is an easy problem or if I need something?

Currently I have a PhP Forum running on my site.
I am able to generate Javascript to have a live feed in my HTML pages.

I am also able to generate an url for RSS feed of the forum.

MY Problem is that once I get the url I don't know what to do with it...and when I click it an error page shows up.

I am thinking I need something to make it work?

If anyone could Point me in the right direction--Thank You!

Anna

trillianjedi

10:40 am on Oct 24, 2006 (gmt 0)

WebmasterWorld Senior Member trillianjedi is a WebmasterWorld Top Contributor of All Time 10+ Year Member



First thing to do, is run the feed through a validator:-

[feedvalidator.org...]

Next thing, are you serving it with the correct extension and is apache correctly identifying it and serving the right header?

As you're in PHP, you can force this. Here's how I do it:-

if ($markup == "atom") {
header("Content-Type: application/atom+xml");
} else {
header("Content-Type: application/rss+xml");
}

If your feed does not validate, start by reading the specification pages here:-

[feedvalidator.org...]

I am thinking I need something to make it work?

No, if it's a valid feed served with the correct headers, just put a link to it in the page:-

<a href="www.example.com/myfeed.rss">Get My RSS Feed</a>

TJ

 

Featured Threads

Hot Threads This Week

Hot Threads This Month