Codice PHP:
$file_remoto "http://www.tuosito.it/file.txt";
$file "./file.txt"
$dati file_get_contents($file_remoto);
file_put_contents($file,$dati);