Codice PHP:
<?php // copia i file remoti da un host all'altro!
function copy_remote($remotefile, $localfile)
{
// file sorgente
$srcfile = fopen($remotefile,"r");
// controlla se si può aprire la scrittura
if(!($fpl = fopen($localfile,"w")))
{
die("Impossibile aprire il File in Scrittura!");
}
// legge un chunk del file
// scrive il chunk nel file locale
$tot = filesize($remotefile);
while($contents = fread($srcfile,8192))
{
fwrite($fpl,$contents,strlen($contents));
$car += strlen($contents);
print(round($car / $tot * 100) ."%
");
}
// chiude il file remoto
fclose($srcfile);
// chiude il file locale
fclose($fpl);
}
?>
Se il tuo server lo permette.... dovrebbe andare penso... :master: