Incoming XML looks completely corrupted - sometimes!

I’m calling a php page from my Actionscript which generates XML and sends it back to me. No problem; I’ve done this hundreds of times before. Now, however, I get a weird problem: The second time (and subsequent times) I call the php page, the returned XML looks like

~°€ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ

when I trace the event.target.data. Just a random string of corrupted data. Flash naturally gives the error message that the XML is ‘not well-formed’. (Duh.)

The code I use for retrieving the data is:


waitingNotificationsPHPRequest = new URLRequest(waitingNotificationsPath);
waitingNotificationsPHPLoader = new URLLoader();
currentURLLoading = waitingNotificationsPath;
waitingNotificationsPHPLoader.addEventListener(Event.COMPLETE, sortWaitingNotificationsXML);			waitingNotificationsPHPLoader.addEventListener(IOErrorEvent.IO_ERROR, displayErrorWindow);			waitingNotificationsPHPLoader.addEventListener(ErrorEvent.ERROR, displayErrorWindow);			waitingNotificationsPHPLoader.load(waitingNotificationsPHPRequest);

function sortWaitingNotificationsXML(evt:Event):void {
trace(evt.target.data);
}

The first call generates perfect XML. This only happens from the second time I call the php page, and I do it the exact same way each time. I should add that calling the php page from the browser gives no problem at any time.

Has anyone every seen anything remotely like this? I’m not only stumped on the problem itself, but also where to start googling for solutions.