[PHP] Re: Check if directory has changed

2003-01-25 Thread Peter Litov
Hi Carlos,

  Directories are just normal files thus they have "Last Modified" and "Last
Changed" time stamps. So the quickest and easiest way is to check these
times periodically and if any of them has changed then there was some
activity other than reading in the directory. You can get the timestamps
using stat() function.

Regards,

Peter

"Carlos Fernando Scheidecker Antunes" <[EMAIL PROTECTED]> wrote in
message 003301c2c4df$d3fa42e0$9d505ad1@Nando0">news:003301c2c4df$d3fa42e0$9d505ad1@Nando0...
I would like to write a function to check if the contents of a directory,
its files, have been changed.
The idea is to check the directory every 2 minutes and take some actions if
some files were updated
or new files added.

Does anyone has any ideas?

I was considering listing the files (name, date modified, size) on a
variable array, then list again and compare both arrays. In case there are
different, take some action.

Thank you,

C.F.




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




[PHP] XORing a string with some hash???

2003-01-25 Thread Peter Litov
Hello everybody,

  I was wondering if someone can tell me how do I XOR a given string with
some hash .. like MD5 hash or something. I know how to do this in C - it's
more than easy but with PHP I can't find a way at all.
  Thank you all in advance.

Regards,

Peter




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