makefulltextfeed.php adds strange characters at the beginning of

When I call makefulltextfeed.php with cURL or with file_get_contents deploying my application on Bluehost (PHP 5.3), I get those characters 
just before
&lt?xml version=“1.0”

Though, this does not happen if I call makefulltextfeed.php frommy computer, from my localhost (Windos XAMPP and PHP 5.3.8).

Hi Ivo, could you show us the code you’re using?

$five_filters_request = “http://localhost/full-text-rss-3.0/makefulltextfeed.php?url=ANYURL”;
$out_file_filters = url_get_contents($five_filters_request);

echo "OUT_FILE_FILTERS LOCALHOST : " . htmlentities($out_file_filters) . “


$five_filters_request = “http://www.MY_REMOTE_SERVER_ON_BLUEHOST/myphp/full-text-rss-3.0/makefulltextfeed.php?url=ANYURL”;

$out_file_filters = url_get_contents($five_filters_request);
echo "OUT_FILE_FILTERS BLUEHOST : " . htmlentities($out_file_filters) . “


Those two calls produce different results. The second adds  at the beginning. I “resolved” the problem with the following line
$out_file_filters = substr($out_file_filters, ($pos = strpos($out_file_filters, ‘<’)) !== false ? $pos : 0);

but I wonder why should be like that.

this is the function I call (but does not change with file_get_contents() )
function url_get_contents ($Url) {
if (!function_exists(‘curl_init’)){
die(‘CURL is not installed!’);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $Url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
return $output;


Hi Ivo, sorry for the late reply.

This look like a character encoding issue. Full-Text RSS should output in UTF-8 and send the appropriate HTTP headers. The output you’re getting suggests UTF-8 is being sent back, but is not being handled properly in the second case. I’m not sure why that is - but if I had to guess I’d say that the remote server is changing the HTTP response headers in a way which causes your script to treat the response as something other than UTF-8. If you’d like us to check, please email us - - with the location where you’ve installed Full-Text RSS and we can take a look.