I have come across an interesting problem of synchronizing files against a remote server (in this case, it's event-driven, so a file would have to be placed on the remote server as well as the local server.)
I have full control over the local server, but limited control over the remote server. No shells allowed, but there is php/apache and ftp.
I thought of 3 possibilities:
1. Sync manually. Of course, this really isn't a possibility as I'm not always the person who generates the event that would require a sync/upload to the remote server.
2. Use the FTP functionality of PHP to copy the file to the remote server. The problem is, if 2 people do this at once, one will be denied - the server allows only 1 FTP login at a time.
3. Set up a script that takes POST input, and restrict it with htaccess so my local server is the only one that access it. This seems the most likely way to do this, except I have not been able to locate something that explains how to get a PHP script to post directly to a form.
Any thoughts?
I have full control over the local server, but limited control over the remote server. No shells allowed, but there is php/apache and ftp.
I thought of 3 possibilities:
1. Sync manually. Of course, this really isn't a possibility as I'm not always the person who generates the event that would require a sync/upload to the remote server.
2. Use the FTP functionality of PHP to copy the file to the remote server. The problem is, if 2 people do this at once, one will be denied - the server allows only 1 FTP login at a time.
3. Set up a script that takes POST input, and restrict it with htaccess so my local server is the only one that access it. This seems the most likely way to do this, except I have not been able to locate something that explains how to get a PHP script to post directly to a form.
Any thoughts?