开发者

how to download another website file into my website?

hi I have a domain.com website and I was wondering how would I download a file with simple url into my websit开发者_高级运维e space ? is it using shell scripts or what ?


use wget or wget for windows


It depends on the tools you have available on the web server. If you have ssh access, and either wget or curl is installed on the server, then that would be the easiest way: ssh into the server, and the issue a command like this:

wget http://example.com/resource

If you don't have ssh access, you'll need to write a script in whatever scripting language you have available on the server, make sure it's properly protected, and then run it.


That completely depends on what kind of access you have to the server.

When you have shell access, for example you could do a simple wget <url> to download a file, and then you would just move it to the correct location.

Otherwise, if it is shared hosting and you only have ftp access, you can put a script on the server you can executes that then downloads a remote file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜