
Load mp3 from an php file.
Hi guys,
I have some problems loading my mp3 file in the JW player.The mp3 file comes from a php file with the following code:
*myfile.php:*
bc.. <?php
$audio=array(
'1' => 'file1.mp3',
'2' => 'file2.mp3'
);
readfile ($audio[$_GET['mp3']]);
?>
My html code :
*test.html*
bc.. <p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p>
<script type="text/javascript">
var s1 = new SWFObject("mediaplayer/player.swf","ply","350","350","7","#ffffff");
s1.addVariable("allowfullscreen","true");
s1.addVariable("allowscriptaccess","always");
s1.addVariable("wmode","opaque");
s1.addVariable("file", encodeURIComponent("myfile.php?mp3=1"));
s1.addVariable("type", "sound");
s1.write("player1");
</script>';
The mp3 file doesn't load.
I'm using the 4.2.90 version.
Have you an idea where is the issue and how can i fix it ?
Thanks