# Display images PHP-XML-CS3

**URL:** https://forum.kirupa.com/t/display-images-php-xml-cs3/260664
**Category:** flash
**Created:** [May 18, 2008, 1:21pm UTC](https://forum.kirupa.com/t/display-images-php-xml-cs3/260664 "2008-05-18T13:21:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dataxa](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@dataxa](https://forum.kirupa.com/u/dataxa)
#### Post date: [May 18, 2008, 1:21pm UTC](https://forum.kirupa.com/t/display-images-php-xml-cs3/260664/1 "2008-05-18T13:21:09Z")

</div>

I am trying to load images from server to CS3 via XML file, which is created by php. My xml structure is like this:

```auto

<picture>
  <id></id>
  <name></name>
  <size></size>
  <binary><?=base64_encode($contents)?></binary>
</picture>

```

$contents = loaded from image file using fopen and fread.

I load the xml file and can access all the data. I also have base64 decoder working on flash, but my question is how to display the picture i loaded this way.

---

<div class="post-metadata">

### Author: ![Ikinsey](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Ikinsey](https://forum.kirupa.com/u/Ikinsey)
#### Post date: [May 19, 2008, 12:32am UTC](https://forum.kirupa.com/t/display-images-php-xml-cs3/260664/2 "2008-05-19T00:32:11Z")

</div>

There’s no way you can accomplish this sending a URL in the XML?

As far as the base64 encoding, I believe you have to use an external AS3 library for that. I used one a while back, I don’t remember what it was called though. A quick google search should turn a few up.

---

<div class="post-metadata">

### Author: ![dataxa](https://avatars.discourse-cdn.com/v4/letter/d/c0e974/32.png) [@dataxa](https://forum.kirupa.com/u/dataxa)
#### Post date: [May 19, 2008, 7:27am UTC](https://forum.kirupa.com/t/display-images-php-xml-cs3/260664/3 "2008-05-19T07:27:05Z")

</div>

The question is not about how to encode/decode base64, please read my post before replying. Its clearly said that i have base64 decoding working on flash. I wanted to know how to display the picture on flash when i have binary data in variable.

---

<div class="post-metadata">

### Author: ![Ikinsey](https://avatars.discourse-cdn.com/v4/letter/i/f14d63/32.png) [@Ikinsey](https://forum.kirupa.com/u/Ikinsey)
#### Post date: [May 19, 2008, 6:59pm UTC](https://forum.kirupa.com/t/display-images-php-xml-cs3/260664/4 "2008-05-19T18:59:46Z")

</div>

The base64 encoder/decoder I used had methods for handing binary image data as well.

Quit being so poignant in your responses.
