I
I
Igor Arkhipov2016-05-05 18:54:19
PHP
Igor Arkhipov, 2016-05-05 18:54:19

What is better to use to download files from another host?

There is a url like site.ru/sharelinks/idABC/id12345 (exactly like this, on a subdomain - not an option)
When accessing the url, host number 1 partially loads the page and pulls files from another host number 2 (purely for distribution of statics).
There is an option to do it through:
1) curl - processed the url, took the id's, downloaded the files from the link, turned off
2) sshFS - cut the desired folder with statics from host #2 into the file system of host #1 into the site folder, the files will be loaded by themselves
Those cons that I see with curl - it takes a lot of resources to start and download (I know, this is a crutch, but it works for now)
Those cons that I see with sshFS - it can fall off periodically, you need to reconnect somehow
Are there any reasonable alternatives?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DuD, 2016-05-17
@IgorArkhipov

Do you really need to download them? Or do you just want to give them to the user?
if the latter, then you can use nginx which will follow the statics to another server.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question