# Passing XML via PHP to Flash app, help pls

**URL:** <https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428>\
**Category:** Uncategorized\
**Created:** [June 17, 2003, 8:46pm UTC](https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428 "2003-06-17T20:46:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cybertao](https://avatars.discourse-cdn.com/v4/letter/c/49beb7/32.png) [@cybertao](https://forum.kirupa.com/u/cybertao)\
**Post date:** [June 17, 2003, 8:46pm UTC](https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428/1 "2003-06-17T20:46:32Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 20, 2003, 3:41pm UTC](https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428/2 "2003-06-20T15:41:29Z")

</div>

Simple questions not allowed…

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

:cyborg:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 20, 2003, 4:09pm UTC](https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428/3 "2003-06-20T16:09:42Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 20, 2003, 4:43pm UTC](https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428/4 "2003-06-20T16:43:15Z")

</div>

Macromedia have a technote on this: [Loading Data across Domains](http://www.macromedia.com/support/flash/ts/documents/load_xdomain.htm#proxy)

And it can be done with PHP.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 20, 2003, 6:50pm UTC](https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428/5 "2003-06-20T18:50:15Z")

</div>

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. 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 20, 2003, 7:04pm UTC](https://forum.kirupa.com/t/passing-xml-via-php-to-flash-app-help-pls/23428/6 "2003-06-20T19:04:18Z")

</div>

Thanks njs12345 the link was just what I needed.

```php

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

readfile($dataURL);

```

Didn’t realise it was this easy.

🙂
