title: Handling byte-range requests with cURL
body: <p>I am currently trying to stream a video to an iPhone. My situation is almost identical to <a href="https://stackoverflow.com/questions/3128906/mp4-plays-when-accessed-directly-but-not-when-read-through-php-on-ios">this</a> question, just a bit more specific. The video I am retrieving comes from a different website, so I cannot change how the videos are retrieved.</p>
  
  <p>I currently have to post some data to a URL, and I will get a video back (if all the data is valid). I currently just grab the data using cURL, echo it out, and set the header to <code>video/mp4</code>. This works fine in most cases, but like the other question - it won't work for iPhones. I looked it up, and obviously came across that.</p>
  
  <p>Now, this would be fine if I were simply reading a file from a server, but unfortunately, that's not that case since I have to post specific data to the server to actually retrieve the video.</p>
  
  <p>How would I go about handling byte-range requests with cURL?</p>