<?PHP
$inputfile = FOPEN("http://the-remote-server.com/inputfile.txt", "r");
$outputfile = FOPEN("outputfile.txt", "w");
ECHO "File opened...";
$data = '';
WHILE (!FEOF($inputfile)) {
$data .= FREAD($inputfile, 8192);
}
ECHO "Data read...";
FWRITE($outputfile, $data);
ECHO "transfered data";
FCLOSE ($inputfile);
FCLOSE ($outputfile);
ECHO "Done.";
?>