How to download a file to server PHP?

前端 未结 4 1799
傲寒
傲寒 2021-01-24 05:04

Is it possible with PHP script to have the script download a file on a remote server to my web server?

I have my own webserver and domain. I want to put a php script on

4条回答
  •  不知归路
    2021-01-24 05:42

    Yes, with file_get_contents(), fgets(), or readfile(), depending on your server configuration.

    Create a file locally and dump the data from any of those functions, into your new local file.

提交回复
热议问题