D
D
drboboev2018-01-17 09:17:38
PHP
drboboev, 2018-01-17 09:17:38

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

4 answer(s)
A
Artem Moseev, 2018-01-18
@Fantyk

flysystem.thephppleague.com/adapter/sftp

E
Eugene Volf, 2018-01-17
@Wolfnsex

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 .

I
ivankomolin, 2018-01-17
@ivankomolin

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.

V
Viktor Taran, 2018-01-17
@shambler81

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 question

Ask a Question

731 491 924 answers to any question