title: How to make php file download?
body: <p>So I have this in my PHP script on my test site:</p>
  
  <pre><code>$file="clip.mp4";
  $fake="clip_testing.mp4";
  $fsize = filesize($file);
  header("Content-Length: $fsize");
  header("Content-Disposition: attachment; filename=$fake");
  header("Content Type: application/download");
  
  set_time_limit(0);
  $fs = @fopen($file,"rb");
  
  while(!feof($fs))
  
  {
      print(@fread($fs, 1024*8));
      ob_flush();
      flush();
  }
  </code></pre>
  
  <p>When I use this to in a link and download the file, the first 7 bytes of my files are changed .. therefore I have to edit the program before I can use it. I have added a picture to make it more clear as to what I am talking about when I say the first 7 bytes have changed. Am I missing headers? Can anyone help me? <img src="https://i.stack.imgur.com/LokJu.png" alt="Comparison">     </p>
  
  <p>EDIT: If you guys are having a problem viewing the picture because of its size, look at the image in a new tab without the formatting so it will be its original size. </p>