Codice PHP:
...
...
...

while($thisGal = mysql_fetch_array($galsResult)) {


$filename = "http://".$_SERVER["HTTP_HOST"].$thisGal["galleryUrl"];
$ch = curl_init();  
$timeout = 5; 
curl_setopt ($ch, CURLOPT_URL, $filename);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
$file_contents = curl_exec($ch);
curl_close($ch);



    ?>
        <item>
        <title><?= htmlspecialchars($thisGal["galleryName"]) ?></title>
        <link>[url]http://[/url]<?= $_SERVER["HTTP_HOST"?><?= $thisGal["galleryUrl"?></link>
        <content:encoded><![CDATA[
        <?= return $file_contents?>
        ]]></content:encoded>
        </item>
    <? ?>
    </channel>
</rss>
Così non funziona perchè mi dà un errore qui

<?= return $file_contents; ?> (syntax error, unexpected T_RETURN, expecting ',' or '

Se lo modifico così funziona:

<?= $file_contents ?>

il problema è che non vedo il codice XML ma il codice HTML che mi sputa fuori da $file_contents