# PHP, RSS and byte order mark

**URL:** <https://forum.kirupa.com/t/php-rss-and-byte-order-mark/162906>\
**Category:** programming\
**Created:** [September 17, 2005, 2:32pm UTC](https://forum.kirupa.com/t/php-rss-and-byte-order-mark/162906 "2005-09-17T14:32:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blixt](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blixt/32/1689_2.png) [@blixt](https://forum.kirupa.com/u/blixt)\
**Post date:** [September 17, 2005, 2:32pm UTC](https://forum.kirupa.com/t/php-rss-and-byte-order-mark/162906/1 "2005-09-17T14:32:37Z")

</div>

I’m having some problems with my PHP script for generating an RSS feed.  
It validates fine using [feedvalidator.org](http://feedvalidator.org) and most aggregators accept it fine.  
But MXNA is saying that “Your feed has the tag “\<feff\>” at the beginning,  
before the XML prolog, which is breaking our parser”.

Researching a bit on the subject it seems to me like the issue would be related to the unicode byte order mark.  
Notepad apparently adds a BOM when you save a file as utf-8, but PHP, Java and many parsers will choke on an XML file if it has a BOM before the prolog.  
I have now resaved the file as “UTF-8 cookie” with SciTE, which I hope will resolve the issue.

But I like to make 100% sure that my file is starting with “\<?xml…”, and have no crap before that.  
Opening the feed.php in the browser and saving it to disk and to inspect it with a hex editor does not display anything before the prolog, even with the version I saved from notepad.

So…how can I view the raw output of my PHP script in the same way as a parser would do?  
And is there anyone who had similar issues with feed aggregators?
