Page 1 of 1

MP3 Upload & Download

Posted: Sat Apr 10, 2004 4:48 am
by Mahesh
Hi,

I am writing code to upload and download MP3 files of size around 75 MB. I would like to do this using http. I am using this code for download this.

header("Cache-control: private");
header("Content-Type: application/mp3");
header('Content-Disposition: attachment; filename='.$file_name);
header("Content-Transfer-Encoding: binary");
readfile($GLOBALS["SHOW_ARCHIVE_PATH"].$file_name);

This code only works for downloading files less than 5 MB. However I need to download larger files.

For uploading I am using the copy function. Here also it does not allow files more than 10 MB.

Can anyone help me with the code to do this?

Thanks.

Posted: Sat Apr 10, 2004 5:24 am
by timvw
Are you sure the script doesn't timeout? lookup how to change the maximum execution time.

Posted: Mon Apr 12, 2004 3:56 am
by Mahesh
Hi,

How to set the timeout settings for this? I am a bit of a rookie to PHP.

Thanks
Mahesh

Posted: Mon Apr 12, 2004 7:02 am
by timvw
There is only one source, http://www.php.net/manual

It knows everything you wanted to know, and more :)