Skip to content
Advertisement

PHP download a file through direct link and save it on my server

I’m trying to run PHP script (from a Linux server) that will download a file through direct download link and save it on my server.

here is the script I’m using:

JavaScript

for some reason it doesn’t work for me, any suggestions ?

Advertisement

Answer

You need to verify that the ports are open on your firewall and use the below command: (this will also download the file in the original format)

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement