Search code examples
phpsecurityfiletransfer

PHP server to server daily file transfer


I need a way of transferring the latest in a list of files from one server to another, and (if possible) replacing the file from the previous days transfer.

I.e. I have this image file on a secured server "http://username:password@mysite.com/image-22-2.png" (where 22-2 represents day-month) which is automattically transfered to a non-secure server.

The next day this file is uploaded onto the secure server "http://username:password@mysite.com/image-23-2.png" and I need "image-22-2.png" to be deleted and "image-23-2.png" to replace it.


Solution

  • consider using rsync if your host permits it