Usa file_get_contents() e poi le funzioni fopen() fwrite() e fclose() per scrivere nel nuovo file.
Regole del Forum