When executing the following code I get "1f4d" at the top of the line. Looks like some noise. How do I fix this?
$snoopy = new Snoopy();
$url = "http://eoe.is/liverpool/?feed=rss2";
Well, you load an XML file ... and then you simply try to display it`s contents .... nothing wrong so far ... but if your browser has character-encoding set on WESTERN and the XML has UTF8, you might get something like that... which is the signature of UTF encoding .... I`m not sure if this is the case ... but try to run the code again .. and play a little with your browser encodings... (View-> Character Encoding ->...... for FireFox Mozilla) .... lemme know how it went...
I've tried playing with the browser encodings, but still I get the same result as before. I've also tried saving the content to a file, but with the same results. And I've tried using some UTF8 encoding and decoding functions in PHP as well.
Oh and I tried executing this in the following browsers: IE 6, IE 7, Mozilla Firefox and Safari.
I'm beginning to think that this is a bug in Snoopy.
often this happens if you use snoopy with HTTP/1.1 instead of 1.0.
but sometimes i noticed this also happens when using HTTP/1.0
i always thought it is my crappy code but if it happens to you too i will be a bug i think...
as workaround you can cut the "crap-chars" out, e.g with substr()
After a further examination of the output from snoopy->results, there is more "noise" later in the contents as well, so using substr() is not a good solution, maybey only for this file, put I'm using this on a few hundred of feeds and the noise never is the same.
This seams to be a bug in WP 2.1.X, after the user update to version 2.2 this extra code is gone.
Log in to post a comment.