PHP Audio preview functionality

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
code-ape
Forum Newbie
Posts: 2
Joined: Fri Jul 31, 2009 8:13 am

PHP Audio preview functionality

Post by code-ape »

Hey guys! First time poster here.. Nice forum!

So yea, i've been wanting to do an audio preview in php but i'm not finding much! Could it be that this type of functionality is usually done using Flash? Does anyone here know of any libraries or Open Source made libraries?

Any info would be a great help!
Thanks guys
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Audio preview functionality

Post by jackpf »

This wouldn't be done with php. PHP is parsed on the server....
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: PHP Audio preview functionality

Post by pickle »

I think technically it's possible in PHP, but in no way worth the trouble.

This is usually done in Flash. There are quite a few players out there that you can easily use.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Audio preview functionality

Post by jackpf »

What??! How the <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> would you do this with PHP? :P

xD
code-ape
Forum Newbie
Posts: 2
Joined: Fri Jul 31, 2009 8:13 am

Re: PHP Audio preview functionality

Post by code-ape »

Thanks for the replies,

Yea, i know most of it is javascript or flash but was just wondering if there was already anything done in the backend using php.

I know this isn't a Flash forum, but if you guys know of any good flash players, please post!

Thanks again
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: PHP Audio preview functionality

Post by pickle »

jackpf wrote:What??! How the <span style='color:blue' title='I'm naughty, are you naughty?'>smurf</span> would you do this with PHP?
I don't know off the top of my head, but it would involve reading the source audio file byte by byte, doing some conversion, then sending audio to the browser in a way it could understand - like mimicing an MP3 or something.

By no means simple, but I think if someone really wanted to, it could be done.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
jackpf
DevNet Resident
Posts: 2119
Joined: Sun Feb 15, 2009 7:22 pm
Location: Ipswich, UK

Re: PHP Audio preview functionality

Post by jackpf »

Hmm....I think I'd have to see it to believe it :P
Post Reply