FTP Copy
3 answers - 819 bytes -

I've been looking on php.net, but can't find anything that covers this
Basically, I am using PHP FTP to connect to an FTP server and run some
functions. I want to copy a directory on the FTP server to another
directory on the FTP server. Since there isn't an ftp_copy() function, I
have to use ftp_get() to bring the file to the local webserver temp folder,
then use ftp_put() to place it into a different folder on the FTP server.
This is quite a big pain, since the webserver is not on the same network as
the remote FTP server, so it must download the file and then upload it to a
different place (takes a long time). Is there an FTP that will just copy
the file/folder from the FTP server without the need to download/upload it
somewhere else?
Thanks,
Matt
No.1 | | 885 bytes |
| 
ftp_rename() should be able do that
Matt Palermo wrote:
I've been looking on php.net, but can't find anything that covers this
Basically, I am using PHP FTP to connect to an FTP server and run some
functions. I want to copy a directory on the FTP server to another
directory on the FTP server. Since there isn't an ftp_copy() function, I
have to use ftp_get() to bring the file to the local webserver temp folder,
then use ftp_put() to place it into a different folder on the FTP server.
This is quite a big pain, since the webserver is not on the same network as
the remote FTP server, so it must download the file and then upload it to a
different place (takes a long time). Is there an FTP that will just copy
the file/folder from the FTP server without the need to download/upload it
somewhere else?
Thanks,
Matt
No.2 | | 900 bytes |
| 
Matt Palermo wrote:
I've been looking on php.net, but can't find anything that covers this
Basically, I am using PHP FTP to connect to an FTP server and run some
functions. I want to copy a directory on the FTP server to another
directory on the FTP server. Since there isn't an ftp_copy() function, I
have to use ftp_get() to bring the file to the local webserver temp folder,
then use ftp_put() to place it into a different folder on the FTP server.
This is quite a big pain, since the webserver is not on the same network as
the remote FTP server, so it must download the file and then upload it to a
different place (takes a long time). Is there an FTP that will just copy
the file/folder from the FTP server without the need to download/upload it
somewhere else?
You can't do this through ftp itself so I think you're out of luck.
No.3 | | 273 bytes |
| 
Tue, September 19, 2006 8:14 pm, Chris wrote:
FTP copy
Depending on the security issues, and SCP from exec() may be more
suitable
Another option would be to upload a PHP script to one or the other
that does the FTP you want one way or the other :-)