PHP Download Archive file from URL

How to Download Archive file from URL using PHP. It’s Very easy tricks to download archive file from server or URL. We are using download file_put_contentthe file. just used below code for the download file.

Using this code you can transfer file server to server without download. you can transfer your project from one server to another server without download file and without wasting time on download and upload the file. using this trick you can transfer around 21GB file from one server to another server.

file_put_contents("zipname.zip", fopen("http://example.com/filename.zip", 'r'));

If you face any problem after using this code please write a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s