Passing XML via PHP to Flash app, help pls

I need some help with working out how to pass XML to flash via PHP from a different domain. I want to load it into the actionscript XML object but because of the security issues it doesn’t allow for this.

Has anyone got any experience with this so I can be put in the right direction, not having much luck at the mo.

Thanks for any help

Simple questions not allowed…

Looks like I’m going to have to finally get round to studying php for real.

:cyborg:

I actually missed this thread. Sorry boss…

I don’t think you can. PHP does not handle remote file locations and if you try to call XML from Flash directly from a different domain you get a sandbox error…

Macromedia have a technote on this: Loading Data across Domains

And it can be done with PHP.

njs12345:
That’s it! Didn’t think of Macromedia as they have nothing to do with PHP but now you mention them and thinking about the wonders they’ve done with DWMX by incorparating PHP and mySQL shortcuts that write chunks of code and keep with the variables they must of got a tech note on redirecting XML to flash somewhere.

Just thought this question was too simple for most of you here as I’m only just getting down to serverside scripting, didn’t mean to sound arrogant, just getting a bit pissed with all the walls I’m coming up against at the moment. Teething challenges you could say. :slight_smile:

Thanks njs12345 the link was just what I needed.


$dataURL = "http://www.macromedia.com/desdev/resources/macromedia_resources.xml";

readfile($dataURL);

Didn’t realise it was this easy.

:slight_smile: