Answer the question
In order to leave comments, you need to log in
How to save a file on another server in PHP?
Good afternoon.
The task is as follows:
There is a server on which the site is hosted. It is necessary to receive a file from the user through the file upload form and send it to ANOTHER server and receive a response from the remote server about the successful upload of the file.
I suspect that you need to dig in the direction of cURL, but still I decided to ask the experts.
Answer the question
In order to leave comments, you need to log in
I suspect that you need to dig in the direction of cURL, but still I decided to ask the experts.You can cURL, you can take a ready-made library .
If the file is not needed on the server where the site is hosted, then the correct options are as follows:
Immediately send from the form to another server.
If you do not want to show the address of another server, then look towards the proxy.
like
php.net/manual/ru/function.exec.php
Who can do
https
://www.shellhacks.com/ru/ssh-execute-remote-c
... engine
Separate option:
Tritely mount the folder and execute it via wget, in general there are so many options that you need to understand exactly what and why you are doing.
I offered you non-standard ones, which will be offered to you not by a php programmer, but by an admin.
But there are options there too.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question