NYCPHP Meetup

NYPHP.org

[nycphp-talk] Re:filesize & download

Aniesh joseph anieshjoseph at gmail.com
Wed Feb 6 02:29:34 EST 2008


I tried stat() function but it doesn't return the result. Anyway I got a
function to calculate the size of the remote file and it works fine. The
page link is below:

http://textsnippets.com/posts/show/1214

But now some other issue at the time of audio download. I use the following
headers in  the download page:


$mm_type="application/octet-stream";

header("Cache-Control: public, must-revalidate");
header("Pragma: hack");
header("Content-Type: " . $mm_type);
header("Content-Length: " .(string)(filesize($myFile)) );
header('Content-Disposition: attachment; filename="'.$filename.'"');
header("Content-Transfer-Encoding: binary\n");

readfile($myFile);


But an error occured when I play the audio.

Can someone suggest another method for audio downloading ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080206/8f71ae24/attachment.html>


More information about the talk mailing list