Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6205309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:15:03+00:00 2026-05-24T05:15:03+00:00

I need help in exporting a bytearray to a wav or mp3 (or anything

  • 0

I need help in exporting a bytearray to a wav or mp3 (or anything that runs!) from my flash code to my php page.

I am using microphone recorder to record voice, i use a a url request to send my ByteArray to my PHP page.

i send the bye array from flash like this:

var url = “http://localhost/wordswesay/uploads/testrec.php”;
var header:URLRequestHeader = new URLRequestHeader (“Content-type”, “application/octet-stream”);
var request:URLRequest = new URLRequest(url);

            request.requestHeaders.push (header);
            request.method = URLRequestMethod.POST;

            request.data = soundBytes; //FLV byteArray  
            var loader:URLLoader = new URLLoader();

            trace(request.data);
            loader.load(request)

and in my php file, i do the following:

<?php

echo "test";

  $im =  $GLOBALS["HTTP_RAW_POST_DATA"];
    $fp = fopen("test.wav", 'w');    
    fwrite($fp, $im);
    fclose($fp);

?>

at the server side (the sime file as the php script) i get the test.wav with about 200kb of size but i can not play it! media players says it can’t play this file as the codec might not be supported.

Any help would be appreciated

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:15:04+00:00Added an answer on May 24, 2026 at 5:15 am

    There is more to a audio file than the audio bytes, there needs to be a format specific header, and the bytes need to be stored in a way specific to the format type, which is often (mp3s for example) different then the raw bytes Flash will be giving you (which are decoded already)

    Take a look on Google for a audio encoder, either in AS3 or PHP that will convert your bytes to a mp3 file, I’m sure there is something, but I don’t know one off hand. Hopefully that explains why its not working, and pushes you into the right direction. Goodluck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Need help writing a script downloads data from google insight using c# this is
I am exporting a SQL Server table to a CSV using php (see code
Need help with a query that I wrote: I have three tables Company id
I need help with one ajax function This is raw page setup. Page will
I need some help with vocabulary, I don't use Oracle that often but I
I'm attemting to load an image that I exported from flash CS3 it's a
I have an issue with exporting BLOB to a csv file using php. Obviously
I am currently exporting data from an excel import using excel interop. I've been
I got in every php project (around 25!), some sh scripts that help me
Once again I need some help. I'm working with a table that contains 3

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.