RE: [PHP] file syncronization
| From: | Christensen, BruceX R | Date: | Thu, 03 Aug 2000 19:16:20 +0000 |
| Subject: | RE: [PHP] file syncronization | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10298@lists.php.net to get a copy of this message | ||
Look at the stat() command: http://www.php.net/manual/function.stat.php.
The file size is a useful, but not foolproof, method of determining if the
file has changed. Another option would be to generate an MD5 or similar
hash for each of the files. If one is different than the other, you know
something has changed, and you can use the stat() command to find out which
changed last.
--Bruce
Bruce Christensen
Intel Corporation
brucex.r.christensen@intel.com
-----Original Message-----
From: Marc Ryan Ray [mailto:marcray@visto.com]
Sent: Thursday, August 03, 2000 12:09 PM
To: php-general@lists.php.net
Subject: Re: [PHP] file syncronization
I actually am looking for details on how to do it because
we are using an nt/unix environment and want to write
custom scripts.
Marc Ray
marcray@visto.com
marc@holographic.com
-----Original Message-----
From: Soeren Staun-Pedersen staun@itcampus.dk
Sent: Thu, 3 Aug 2000 20:26:17 +0200 (CEST)
To: marcray@visto.com
CC: php-general@lists.php.net
Subject: Re: [PHP] file syncronization
> I would like to know if anyone here knows how to
syncronize
> files. Basically i need to know how to tell if a file
has
> changed since i last downloaded it. What i want to do is
> syncronize two directories on two servers over ftp and
need
> to only download what files have changed. Is there a way
> to tell by date or certain file atrribute? Thanks for
all
> the help.
Look at a program called 'rsync'.