0

I have developed an RSS Feed in php. (can be found at http://www.mofikiworldwide.com by clicking the rss icon in the top right)

My reason for using php to develop the feed was so that I wouldn't have to manually update a feed in an xml file everytime I needed to add something to it. It just reads a database and everytime I sbmit a new blog it auto populates the feed.

You can use IE8 I know to subscribe to the feed but most feedburner style sites can't see my feed or wont load it due to the fact that its not actually a xml file.

Any thoughts?

2
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by Atli
2

Hey.

The fact that the file ends in .php means absolutely nothing to a RSS feed reader. (Or rather; a RSS reader worth using.)
As far as they are concerned, if it acts like a XML file (uses a XML mime type) and talks like a XML file (uses valid XML markup)... it is a XML file.

Testing your feed in Firefox (3.5) seems to work fine, however looking closer at the HTTP response, it identifies itself just as text/xml .

Try changing the mime type to application/rss+xml - the general RSS mime type - see if that helps with the applications that don't accept it.
You can do that by changing the content-type header from within PHP.

<?php
// At the top of the page, or at least before you print your XML feed.
header('content-type: application/rss+xml; charset=ISO-8859-1');

As far as I can see from your feed, the ISO charset is what you use, but if it is not you should edit that part of the header.

P.S.
Testing anything in Internet Explorer is generally a bad idea. Microsoft appear to be stuck back in the 90's, standards vise. (Not literally, but you get my point.)
No version of IE even recognizes the XHTML mime type...

Edited by Atli: n/a

Votes + Comments
Thank you ... perfect easy explanation!
0

Thank you very much I have been to a few forums before finding this one and you are the only one to respond.

Your response by the way is perfect detail thank you ... I will change this based on your advice when I get to the office in the morning.

Again thank you very much.

0

Works great thank you!

As far as IE, I use Internet Explorer to test code because of the fact that if any browser has issues it will be the one. I use Firefox generally but like my sites to be flawless in both :)

Thank you for the help

0

Your welcome. Glad it worked out :)

As far as IE, I use Internet Explorer to test code because of the fact that if any browser has issues it will be the one. I use Firefox generally but like my sites to be flawless in both :)

Yea, unfortunately we are pretty much forced to "break" our code to make it work in IE.
I find it best to develop my code 100% to standards - using Firefox and Chrome to test it in - and then, once it is done, go back and break it so it will work in IE. It's usually easier to apply non-standard fixes to standards-compliant code, then to apply standards-compliant fixed to non-standard code.

Most painful part of the work, having to maim my beautiful code to get IE to understand it :'(

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.