Hi Vincent (and everybody else),
It looks, like you could propablly have tips for the following problem:
I want to let a PHP-script move a file from an ftp-server to the webserver the PHP is running on.
My steps:
1) create a file handle for destination:
$fp = fopen("myfile.pdf","w+");
2) connect to ftp, receiving a file handle for the ftp-connection (named e.g. $ftp_con)
3) fill a variable with the destination file name
$dest = ""mydestinationfile.pdf"
4) get the file from ftp and put it into the file handle $fp (myfile.pdf)
ftp_fget ($ftp_con, $fp, $dest, FTP_BINARY)
5) close all connections
After this actions, the file is copied into the folder on the webserver where the php-script is lying. ok.
Now the Problem:
The file is bigger (about 5-10% more Bytes) than the original, and corrupted. It can not be used anymore.
Even when transferring at the ASCII-mode the prob occurs.
What do I do wrong? I´m pulling my hairs out, really!
If you don´t want me being bald, pleease give me a hint! ;-)
Thanks in advance.
Georg