DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   help executing a .wav file with php code (http://www.daniweb.com/forums/thread10658.html)

phpnovice Sep 12th, 2004 1:07 am
help executing a .wav file with php code
 
Greetings,

Would some experts show me php code to play a .wav file?

Thank you very much in advance.

phpnovice

PoA Sep 12th, 2004 4:20 am
Re: help executing a .wav file with php code
 
You can embed html code in php.

Example,
<EMBED SRC="yourfile.wav" HIDDEN="TRUE" AUTOSTART="TRUE"></EMBED>

Hope it helps.

phpnovice Sep 13th, 2004 12:15 am
Re: help executing a .wav file with php code
 
Quote:

Originally Posted by PoA
You can embed html code in php.

Example,
<EMBED SRC="yourfile.wav" HIDDEN="TRUE" AUTOSTART="TRUE"></EMBED>

Hope it helps.

Hi PoA,

Thanks for your help. I tried your code and it only worked outside php. I use dynamic .wav file name that is generated by php, it can not be used outside php.

I will appreciate it very much if you have further suggestion.


phpnovice :cry:

PoA Sep 13th, 2004 8:45 am
Re: help executing a .wav file with php code
 
Post your code or

Try the following code.
[PHP]<?php

$wave_file = generate_wavfile(); //This is the example one.
//Generate/Get wave file name without .wav extension format.

echo "<EMBED SRC=\"$wave_file.wav\" HIDDEN=\"TRUE\" AUTOSTART=\"TRUE\"></EMBED>";

?>[/PHP]

phpnovice Sep 14th, 2004 9:24 am
Re: help executing a .wav file with php code
 
Quote:

Originally Posted by PoA
Post your code or

Try the following code.
[PHP]<?php

$wave_file = generate_wavfile(); //This is the example one.
//Generate/Get wave file name without .wav extension format.

echo "<EMBED SRC=\"$wave_file.wav\" HIDDEN=\"TRUE\" AUTOSTART=\"TRUE\"></EMBED>";

?>[/PHP]


Hi PoA,

Thank you very much. I will try it this evening and let you know.

phpnovice :lol:

phpnovice Sep 14th, 2004 9:29 pm
Re: help executing a .wav file with php code
 
Quote:

Originally Posted by PoA
Post your code or

Try the following code.
[PHP]<?php

$wave_file = generate_wavfile(); //This is the example one.
//Generate/Get wave file name without .wav extension format.

echo "<EMBED SRC=\"$wave_file.wav\" HIDDEN=\"TRUE\" AUTOSTART=\"TRUE\"></EMBED>";

?>[/PHP]

Hi PoA,

I tried and it worked.

Thank you very very much.

phpnovice :cheesy:

Gary King Sep 19th, 2004 12:48 am
Re: help executing a .wav file with php code
 
sounds great! and please don't double post :)

vaultdweller123 Oct 1st, 2009 12:29 am
Re: help executing a .wav file with php code
 
Aha! at last! i found here what ive been searchin for.... tnxs bro your the best!


All times are GMT -4. The time now is 6:30 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC