# A better way to integrate php and flash?

**URL:** https://forum.kirupa.com/t/a-better-way-to-integrate-php-and-flash/259976
**Category:** flash
**Created:** [May 11, 2008, 6:24am UTC](https://forum.kirupa.com/t/a-better-way-to-integrate-php-and-flash/259976 "2008-05-11T06:24:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![anon4341189](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@anon4341189](https://forum.kirupa.com/u/anon4341189)
#### Post date: [May 11, 2008, 6:24am UTC](https://forum.kirupa.com/t/a-better-way-to-integrate-php-and-flash/259976/1 "2008-05-11T06:24:12Z")

</div>

Hey guys,

I am trying to build a few internet applications just to learn how to program oop actionscript and intergrate with PHP.

Currently, to talk with a PHP script, I’d need to use the URLLoader class and send my variables via POST. The script will then return an XML file which i need to parse to get the results. While I have written a class to help with setting up the URLLoader class and parsing the XML, I still feel this is quite tedious.

Is there a better way to do this?

Cheer 🙂

---

<div class="post-metadata">

### Author: ![kitsunegari](https://avatars.discourse-cdn.com/v4/letter/k/eb8c5e/32.png) [@kitsunegari](https://forum.kirupa.com/u/kitsunegari)
#### Post date: [May 11, 2008, 2:07pm UTC](https://forum.kirupa.com/t/a-better-way-to-integrate-php-and-flash/259976/2 "2008-05-11T14:07:30Z")

</div>

I do it the way you do for months now, that’s the only way to do so

---

<div class="post-metadata">

### Author: ![blixt](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/blixt/32/1689_2.png) [@blixt](https://forum.kirupa.com/u/blixt)
#### Post date: [May 11, 2008, 4:45pm UTC](https://forum.kirupa.com/t/a-better-way-to-integrate-php-and-flash/259976/3 "2008-05-11T16:45:28Z")

</div>

Check out AMF. It enables you to use native Flash datatypes in the communication with the server.  
It’s more convenient than using XML so if the data is only to be used by your Flash application it can be a nice alternative.

---

<div class="post-metadata">

### Author: ![anon4341189](https://avatars.discourse-cdn.com/v4/letter/a/ecae2f/32.png) [@anon4341189](https://forum.kirupa.com/u/anon4341189)
#### Post date: [May 14, 2008, 6:38am UTC](https://forum.kirupa.com/t/a-better-way-to-integrate-php-and-flash/259976/4 "2008-05-14T06:38:30Z")

</div>

hi blixt,

i have had a look at AMF. It seems to be a neat solution. However i am wonderinf i i shold us SabreAMF or AMFPHP.

Any suggestions appreciated 🙂

---

<div class="post-metadata">

### Author: ![log2e](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@log2e](https://forum.kirupa.com/u/log2e)
#### Post date: [May 14, 2008, 9:32am UTC](https://forum.kirupa.com/t/a-better-way-to-integrate-php-and-flash/259976/5 "2008-05-14T09:32:39Z")

</div>

[quote=abxccd;2325950]hi blixt,

i have had a look at AMF. It seems to be a neat solution. However i am wonderinf i i shold us SabreAMF or AMFPHP.

Any suggestions appreciated :)[/quote]

My impression is that AMFPHP is more widely used than SabreAMF. There are more articles, tutorials, etc. on AMFPHP than on SabreAMF. Don’t let you get confused by AMFPHP’s beta status. The version 1.9b has been around for a long time now and is a reliable workhorse.
