While trying to make user download a file using headers the connection seems to be lost after a while so could someone please tell me how to work it out
http://www.chaska.com.pk/c1.php << here is the page with the following code
file size = 4.19 MB
connection is lost at around 1.91 MB using 64kps cable internet connection

<?php
set_time_limit(0);
header('Content-Description: File Transfer'); 
header("Content-type: audio/mpeg"); //mp3 contenttype 
 header("Content-Disposition: attachment; filename=ek.mp3"); 
header('Content-length: '.filesize("ek.mp3"));
    readfile("ek.mp3");
?>

your help in this regard would be highly appretiated

    have tried you code locally and it works fine for me, this might sound like sucking eggs but have you check for a corrupted file

    john

      ps the link is just showing me a blank html page

      john

        well yeh i have.. locally it would work because of the speed issue... it gets timeout... anyway i tried it on another hosting and its working... anyone knows any bugs issues while using IIS because while using the same code on IIS using php as module doesnt help
        your comments regarding this would be highly appretiated
        thanks

          probably one of these setting in "BASIC.INI":

          ;;;;;;;;;;;;;;;;;;;
          ; Resource Limits ;
          ;;;;;;;;;;;;;;;;;;;
          
          max_execution_time = 30     ; Maximum execution time of each script, in seconds
          max_input_time = 60	; Maximum amount of time each script may spend parsing request data
          memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)
            Write a Reply...