title: Force MP3 files to download instead of opening in the browser with Quicktime
body: <p>OK I have a website that serves podcasts in MP3 format.  There is a .htaccess that routes requests for MP3 files to a download script, and that is as follows:</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteRule  (.*.mp3)$ download.php?file=$1
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>The PHP download script is as follows:</p>
  
  <pre><code>$filename = (isset($_REQUEST['file']) ? $_REQUEST['file'] : '');
  $filesize = @filesize($filename);
  if ($filename == '' || $filesize == 0) exit(0);
  header("Content-Type: audio/mpeg");
  header("Content-Description: {$filename}");
  header("Content-length: {$filesize}");
  header("Content-Disposition: attatchment; filename={$filename}");
  readfile($filename);
  </code></pre>
  
  <p>Everything works beautifully on PC, and in most Mac browsers.  However, on Safari, Quicktime is intercepting the download.  Same thing is happening on iPhone and iPad.  Since the target audience is likely to be mostly Apple users, I would like the "Download" button to do just that -- download, not play in the browser with the Quicktime plugin, regardless of device.  The "Stream" button can play the file in the browser, but not the "Download" button.</p>
  
  <p>Doing a Right-click (or Cmd+Click) and Save File As... is not acceptable.</p>
  
  <p>Is there any way to do force download across all platforms with PHP, HTTP, HTML, etc. that doesn't require the user to do anything except click the Download button?</p>