title: Download a Facebook Video (.mp4) via PHP
body: <p>So for example I have this URL:</p>
  
  <pre><code>http://video.ak.fbcdn.net/hvideo-ak-prn2/v/1032822_578813298845318_1606611618_n.mp4?oh=c3c6a02985213f7c47386f4653792ca6&amp;oe=5200506F&amp;__gda__=1375798216_02752679a44bc4b3c514bee21e000959
  </code></pre>
  
  <p>How can I download the video source file via PHP?</p>
  
  <p><strong>Note that downloading the URL will not give me the video source!</strong></p>
  
  <pre><code>// does not work:
  file_put_contents('video.mp4', 'http://video.ak.fbcdn.net/hvideo-ak-prn2/v/1032822_578813298845318_1606611618_n.mp4?oh=c3c6a02985213f7c47386f4653792ca6&amp;oe=5200506F&amp;__gda__=1375798216_02752679a44bc4b3c514bee21e000959');      
  // this does not download the video source but instead gets me a file that links to the video hosted on Facebook.
  </code></pre>