is your 'local system' linux? then the totally non answer is probably
that you should be using rsync.

if it's a windows machine you can probably still use rsync there by running
it on top of cygwin.

I would also recommend tunnelling the rsync traffic through an SSH connection.

Larry Bradley wrote:
> The following issues are not really PHP issues, but more properly FTP
> server issues, but perhaps people on the list have some ideas on how to
> solve my problems.
> 
> I've written a PHP program to "mirror" data on a local drive to a remote
> FTP server. It compares file mod times, and only uploads files that are
> newer.  Works like a charm. Except ---
> 
> The remote FTP server is running on a Fedora LINUX system, but I think
> any server would present the same issues.
> 
> To examine the remote directories, I use ftp_rawlist() to get a
> directory listing which I parse. However, the file modification time
> does not have a year, and does not show the seconds. I get around this
> by "assuming" the year is the current one, and then compare the file
> times of the local and remote files ignoring local file seconds. If they
> are different, I use ftp_mdtm() to get the real remote time, and then do
> my compare. This slows things down a bit, as I have to go to the FTP
> server one more time.
> 
> Any thoughts on how to get around this? Is there a way to get a better
> directory listing?
> 
> Second and more serious problem is that when I FTP the file to the
> server, the file mod time gets set to the current (file-creation) time.
> The same thing happens in a local-to-local file copy using copy(), but I
> can use touch() to update the mod time.
> 
> Any thoughts on how I might get the remote FTP server to do the
> equivalent of touch()?
> 
> I realize that these are not actual PHP problems, but maybe one of you
> has run across similar issues.
> 
> Many thanks.
> 
> Larry Bradley
> Orleans (Ottawa), Ontario, CANADA

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to