title: PHP - Download from URL and Upload via FTP
body: <p>Slightly weird concept here... A client of ours wants data pushed to them over FTP/S</p>
  
  <p>The idea is that we download one of our reports by downloading from a URL (a CSV File), then push this to the client over FTP/S. I know I can do this in bash scripts using wget &amp; ftp - but need to add to this over a web interface so PHP is the best way forward.</p>
  
  <p>As this is a background task I can extend time-outs etc.</p>
  
  <p>I know also I can use fopen to download and save a file, then find it and upload it using the PHP FTP library. Just looking for a way to download using fopen, hold the data in memory to upload straight away.</p>
  
  <p>Any help appreciated in advance!</p>