encoding a audio file as a response object

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kishan6
Forum Newbie
Posts: 4
Joined: Fri Nov 21, 2008 3:06 pm

encoding a audio file as a response object

Post by kishan6 »

hi,
I have some song files in .arl format in my application server. i have to encode them and store in the webserver(for security reasons).
How can i acheive this using PHP(php in both Webserver & application Server).
If i have to construct some encoding mechanism at my "application level - php" please let me know how to do it.

Thanks in advance!!!!!
User avatar
veridicus
Forum Commoner
Posts: 86
Joined: Fri Feb 23, 2007 9:16 am

Re: encoding a audio file as a response object

Post by veridicus »

I would encode them from the command line using standard utilities and place the encoded version in a directory exposed by the web server. Then the web server can simply serve each file directly. You may want PHP to help browse these files, but I don't see the need for PHP to be involved in the encoding.
kishan6
Forum Newbie
Posts: 4
Joined: Fri Nov 21, 2008 3:06 pm

Re: encoding a audio file as a response object

Post by kishan6 »

thanks for the reply.

i have read ,about mime encoding, that we can use base64 encoding tecnique . can you please guide me how to do the encoding (using base64 or any other method) using command line , with an example.?
i am using linux os on my application server.
Post Reply