# How to send ByteArray to Flash without using php\_amf extension

**URL:** https://forum.kirupa.com/t/how-to-send-bytearray-to-flash-without-using-php-amf-extension/314601
**Category:** flash
**Created:** [October 3, 2010, 7:47pm UTC](https://forum.kirupa.com/t/how-to-send-bytearray-to-flash-without-using-php-amf-extension/314601 "2010-10-03T19:47:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kayes](https://avatars.discourse-cdn.com/v4/letter/k/ee7513/32.png) [@kayes](https://forum.kirupa.com/u/kayes)
#### Post date: [October 3, 2010, 7:47pm UTC](https://forum.kirupa.com/t/how-to-send-bytearray-to-flash-without-using-php-amf-extension/314601/1 "2010-10-03T19:47:39Z")

</div>

Hi. I’m working on a Flash tool that needs to send some data in the form of a flash.utils.ByteArray instance to PHP (amfphp service class) and get that data back from the amfphp service as flash.utils.ByteArray instance.  
Now I can do all of these with the php\_amf extension enabled on the local WAMP server. And the tool works fine.  
But how can I achieve this without the php\_amf extension? I’m deploying on a shared hosting server and I don’t have access to the php.ini and also the dl() function of PHP is disabled for security reason. With the extension disabled, I can send the ByteArray instance to PHP and save the data to DB. But the problem arises when I try to retrieve the data from DB, create a ByteArray instance (amfphp helper class) with the data and send back to Flash. I’m guessing here that proper AMF message is not being constructed because of the absence of the php\_amf extension.  
Any clues guys?
