Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
I have problems with downloading .wav files, using php.
I just need to stream the .wav files. (filesize is normally 50 - 150 MB).
I tried the following methods.Code: Select all
header("Content-type: ".$fType);
header("Content-Transfer-Encoding: binary");
header("Content-length:".filesize($srcTrack));
header("Content-Disposition: attachment;filename=".$fileName);--------
Code: Select all
$fh = fopen($srcTrack, "r") or die("Could not open file!");
$data = fread($fh, filesize($srcTrack));
fclose($fh);
echo $data;--------
Code: Select all
readfile($srcTrack);Method 3:
--------
Code: Select all
$fp = fopen($srcTrack, "rb");
fpassthru($fp);The issue is, im not able to play the downloaded .wav file
Please help me, what im missing.
Thanks in advance, for any help.
Srini
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]