I want to transfer a file from 1 php server (A) to another php server (B).
The servers are located in different domains.
I was thinking about encrypting the file on server A and then sending a post request to server B, including the the file in the POST headers, and decrypt it.
Do you any tips and recommendation about that?
Should I put the url of the file in the POST headers or the file itself?
Can you suggest a better way to do that?
Thank you!
I wouldn’t put files in the POST, especially if they’re big files. I’m sure there are security concerns to worry about with doing that as well, but the file size issue would just be nothing but headaches.
If you’re going to be transferring files, why not use FTP. After all, that’s what it was made for. Take a look at the PHP manual for FTP functions.