Milksnake12
Milksnake12

Reputation: 561

Saving Audio Recorded on a website into MySQL via PHP

I'm having a hangup that I can't seem to get past. I'm not asking for code (although that would be nice), just trying to get going in the right direction. I'm trying to record audio on my website (press a button and speak into a mic), then have that recording saved onto a server (different than the one that I have my website on). I've found a few flash recorders, but they all seem to want to save to a hard drive on the clients computer. Has anyone had any success with doing something similar? Any recorders that may be easier to accomplish this on? The recorders I've read about seem to be lacking documentation in saving the audio to a MySQL database.

Thanks!

Upvotes: 1

Views: 5966

Answers (3)

Gaurav
Gaurav

Reputation: 628

you ever tried to store images on a website? audio clips have the same manner. just save the file name in database and the clip in a specified folder. at the time of retrieving ,you have to retrieve the name of file from the database and make a complete path to play the audio. hope it help.

Upvotes: 1

Alfred
Alfred

Reputation: 21386

DO NOT save multimedia or large files into your database. You may save filename and associated data into your database table. The file may be given a unique name and you may store that in the database. The file may be copied into the server with that UNIQUE filename and you may even create a folder with some unique name and may be copied the file into that. But the path of the file should be able to retrieve from the database.

Also, you may refer to this stackoverflow question How to record voice files using PHP, FLASH

Upvotes: 0

Sherlock
Sherlock

Reputation: 7597

You don't wanna store the audio in a MySQL database, you wanna store the path to the audio files in the database.

There's a bit of an outdaded example here, showing how you could save the audio on your server. Then it's just inserting the path in an appropriate table in MySQL and you're done.

Upvotes: 1

Related Questions