Welcome Guest, Not a member yet? Register   Sign In
Loading an MP3 file through php validation for "streaming" in flash player
#1

[eluser]amites[/eluser]
has anyone here done this?

I have setup a program to validate that a user has access to a given mp3 file, from there they have the options of downloading it or listening to it through a flash player that is designed to access the file directly through an HTTP protocol (not actual streaming)

The download part works well using:
Code:
<?php
header("Cache-Control: public, must-revalidate");
header("Pragma: hack"); // WTF? oh well, it works...
header("Content-Type: " . $mm_type);
header("Content-Length: " .(string)(filesize($file_path)) );
header('Content-Disposition: attachment; filename="'.$file_name.'"');
header("Content-Transfer-Encoding: binary\n");

readfile($file_path);

?>
however I have had one hell of a time getting it to load into a mp3 player, I figure it has something to do with the "Content-Transfer-Encoding" though I'm honestly in a bit over my head at this point.

any thoughts / advice / help / examples / etc...

thank you


Messages In This Thread
Loading an MP3 file through php validation for "streaming" in flash player - by El Forum - 02-18-2009, 05:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB