title: Best way to get a file from remote server and copy to local server using php
body: <p>Let's say there is a file on a remote server that can be downloaded without any restrictions, ie. you can put the direct link to the file in your browser and it downloads the file, for example <a href="http://www.remotesite.com/video.avi">http://www.remotesite.com/video.avi</a> will prompt your browser to download that file. Using php, what is the best way to grab that file and upload it to my local server without the file being downloaded to my PC at all, which is what happens with phpBB if you put a url in the file upload form? An example of the code needed would also be appreciated. Thanks</p>