Hi,
Below is the code I use to provide downloads of purchased software. It has always worked great for all browsers, except MSIE for Mac (OS X and OS 9). They just receive a blank text file called getfile.php (which is the name of this doc). Can anyone suggest a way to improve this to work better and include those browsers?


                header('Content-Type: '.$file_row['content_type']);
                header('Content-Disposition: 
filename="'.$file_row["filename"].'"');
                $size = filesize('../../store/files/'.$file_row['filename']);
                header('Content-Length: '.$size);
                header('Content-Transfer-Encoding: base64');
                readfile('../../store/files/'.$file_row['filename']);

Sample data:

  content_type = 'application/bin'
  filename     = 'software.bin'

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to