title: mp4 file through php not playing as html5 video
body: <p>I am trying to output an mp4 video file through PHP.
  When it is used through a flash player (eg. flowplayer) it is working great.
  But when I'm trying to use it as a source on an html5 video tag or to call directly the php file, it doesn't work.</p>
  
  <p>The code I use is the following:</p>
  
  <pre><code>        $filesize = filesize($file);
          header("Content-Type: video/mp4");
  
          if ( empty($_SERVER['HTTP_RANGE']) )
          {
              header("Content-Length: $filesize");
              readfile($file);
          }
          else //violes rfc2616, which requires ignoring  the header if it's invalid
          {   
              rangeDownload($file);
          }
  </code></pre>
  
  <p>and <code>rangeDownload</code> function is from <a href="http://mobiforge.com/developing/story/content-delivery-mobile-devices" rel="nofollow">http://mobiforge.com/developing/story/content-delivery-mobile-devices</a> Appendix A.</p>
  
  <p>Even when I use a <code>Content-Range</code> header (<code>Content-Range:bytes 0-31596111/31596112</code>), it stucks on downloading 30.13 MB of the video. </p>