$filecontent=file_get_contents("http://site.com/orig_file.txt"); file_put_contents("file.txt", $filecontent);