Home > Article > Backend Development > Problem with downloading remote files in php
At first, I used curl to obtain it, which is definitely feasible. Then I found that fopen() can also write URLs, and later I found that readfile() seems to be able to do it too.
So I would like to ask which method is generally used to download files? What are the advantages and disadvantages of these methods?
At first, I used curl to obtain it, which is definitely feasible. Then I found that fopen() can also write URLs, and later I found that readfile() seems to be able to do it too.
So I would like to ask which method is generally used to download files? What are the advantages and disadvantages of these methods?