Is it possible to do file operations from a script running on a different server than the files being operated on? That is, upload, move, rename, delete, create new, modify, etc.
How would I go about doing this?
Is it possible to do file operations from a script running on a different server than the files being operated on? That is, upload, move, rename, delete, create new, modify, etc.
How would I go about doing this?
You are basicallly describing WebDAV, which was created so that write-methods like those found in ftp could be done over HTTP.
I imagine it would be tricky to make a non-http file manager with PHP that was save and reliable.
There are several libraries for adding making WebDAV feasible in PHP, not that are core or standard extensions yet, though.
As far as I know, it can be done only by logging into the shell via the remote script and then executing the commands from within the shell, or maybe by using FTP from the remote script.
Another method would be:
Create scripts in the server which will accept parametres (POST data) and do operations based on the arguments that are supplied to it.
Not an answer by any stretch of the imagination, I'm just thinking out loud ...
If the computer with the files to be 'managed' shared the files through SAMBA, I wonder if a client could be implemented in PHP?
Then there's NFS.
yes, this is either possible through php’s ftp functions or the native file system functions.
i wrote one myself (myftphp <-- advertisment :D)
using the native filesystem functions there are always restrictions on permission management, but for managing files in a public directory it’s perfect