title: s3 file to local system php
body: <p>how would I get the file from amazon s3 to local system using php.</p>
  
  <p>I am trying to do this but its not working</p>
  
  <pre><code>$s3 = new AmazonS3("key 1", " acces pass");
          $s3-&gt;getObject("Bucket/filename");
  //write to local
          $fp = fopen('/tmp/filename.mp4', 'w');
          fpassthru($fp);
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>I am trying to save the file to my local server from s3</p>