Link to home
Start Free TrialLog in
Avatar of spikeyjames
spikeyjames

asked on

How to transfer files from a URL or FTP server to my own server?

Hi,
I want to offer 20GB of downloads on my site, but in order to do so, that 20GB needs to be transfered to the server somehow. It will take years to do it using my internet connection, so I was hoping that there would be a way to make my server download the files directly. If anyone knows how I can do this, I would be very grateful if they could help me out.

thanks.
Avatar of periwinkle
periwinkle
Flag of United States of America image

To move the files from your location to the server, you will need to upload it to the server via FTP.  Even if people were to download it directly from your computer, they would be using your slow internet connection.
ASKER CERTIFIED SOLUTION
Avatar of yuzh
yuzh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of spikeyjames
spikeyjames

ASKER

Sorry, I dont think I explained it properly. The server is not connected via my internet connection. It is a dedicated server hosted by a hosting company. I have a 512k ADSL connection, but the upload for it is only 128k which means that it will take hours and hours to add 20GB of files to the server.

yuzh may have the solution, I'll check out wget now. I'm not sure about FTP, doesn't that require me to download and upload the files myself?

thanks.
You can write a script and use cron to run the script, have a look at my script in
the following page and modify it to your need:

http:Q_21057930.html#11546547


also have a look at: (download + docs)

http://www.gnu.org/software/wget/wget.html
Thanks again, you've been a lot of help.

I'm not sure if I should ask this here, or in a new thread, but is there a way of using wget through a php script?

I'm not sure how to implement the script that you gave me.
Do you mean use php to call wget, it should not be a problem, you can do it with almost any
type of shell script.

In your php script, all you need to do is to treat wget as a normal *nix command, and make
sure that you use FULL path.

If you are not sure what to do, post a question in php TA, someone will write one for you.

Cheers!
Thanks very much!