title: PHP Streaming video handler
body: <p>I'm trying to implement a video streaming solution based on user access.</p>
  
  <p>I have many video streams located on a private network connected to the server (http//192.168.100.101/mpeg4/1/media.amp), and I want to "proxy" that video stream through the web server.</p>
  
  <p>I know how to setup the user access part, but how can I proxy the video stream to the user?</p>
  
  <p>I have tried something like this, but it does not seem to work.</p>
  
  <pre><code>header('Content-type: application/x-rtsp-tunnelled');
  $ch = curl_init ();
  curl_setopt ($ch, CURLOPT_URL, "http//192.168.100.101/mpeg4/1/media.amp");
  curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
  $output = curl_exec($ch);
  echo $output;
  curl_close($ch);
  </code></pre>
  
  <p>Any ideas on the best way to do this? How do other streaming sites do it?</p>
  
  <p>Thanks :)</p>