This is the header I'm using:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

This is the header I'm using:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">

thanks but i just tried that and it doesnt work still same error. argh

There are spaces and empty lines before the first tag... make sure you remove them.

i dont think im aware of what u are refering to here is an image of what my code looks like:

Look at the source of your page output: http://www.socialemo.com/rss.php

(view in browser, then view source)

There are 10 empty lines before the <?xml tag. They have to come from somewhere. Find them and delete them.

if u would have looked at my thumbnail i atached u would have seen there are no lines and there are no lines i can delete. i treid putting it all in a seperate file and require that at the top first line and echo output at the 1st line but no it does not work. same error. i tried actually putting the xml type at the top of the page instead of it being in the output variable and no its a different error. :This feed does not validate.

*

Server returned HTTP Error 500: Internal Server Error [help]


*

line 1, column 0: XML parsing error: <unknown>:1:0: no element found [help]


In addition, interoperability with the widest range of feed readers could be improved by implementing the following recommendation.

*

Feeds should not be served with the "text/html" media type [help]


i dont know what to do now!

this is what i have for rss.php:

<?php header("Content-Type: application/rss+xml"); ?><?php $output = "<?xml version=\"1.0\" encoding=\"iso-8859-1\" ?><rss version=\"2.0\" xmlns:atom=\"http://www.w3.org/2005/Atom\">";require($_SERVER["DOCUMENT_ROOT"] . "/db/other.php"); require($_SERVER["DOCUMENT_ROOT"] . "/rssoutput.php");echo $output; ?>

and its all on the first line.

and my thumbnail BELOW is what the output looks like. i assume theres something with the rssoutput.php but i dont understand what is making it go to the 11th line. makes no sense anyone know?

You are also including displace.php. Could that be causing the extra lines ?

ok i took the contents out of the displace and it was 11 lines right... but then i went to the feed validator and it says the very same error BUT ON LINE 21? WHAT IS GOING ON?

then i add the contents of displace back and i shorten it up to about 5 lines and it still says line 11

now when i take the include displace out altogether the error is gone, but the stuff im using kind of needs the displace.php because it strips the information of bbcodes. but heres the errors im getting: ill leave it out so anyone can see: just click
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fwww.socialemo.com%2Frss.php


OK EDIT TO AD: I GOT THE FEED TO VALIIDATE FINALLY! but it still conains bbcodes! is there a way i can get it to include the displace.php or what?

solved. just added the code from displace into the while statement then added htmlentities() on the itm description text

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.