Hi,
I am working on php mysql environment.
What i need to know if there is any wget command for php that will enable me to download a file directly from another server to my own server.
Hi,
I am working on php mysql environment.
What i need to know if there is any wget command for php that will enable me to download a file directly from another server to my own server.
According to me what you can do is drop the wget idea
& use this
I dont know about the file size though.PHP Code:
<?php copy('Remotefile', 'Localfile'); ?>
wget is an amazing Unix tool that I use very often.
While I did not have SSH access to the old server, but had FTP access. I used the following wget command to log into FTP and download every single file under my home directory to the new server:
Within a few minutes all the data had been transferred across.PHP Code:
wget -r -N -l inf [url]ftp://user:pwd@ftp.example.com/foldername[/url]
I hope this helps you!
If you have shell access, you can login, navigate to the directory you want a given file to land in, and use a command like:
From the shell, you can execute raw Unix commands. This is like running DOS commands from a command line.PHP Code:
wget [url]http://archive.org/thefile.zip[/url] (or whatever it actually is).
Bookmarks