0

Hi

I want to download a zip file (xml file in zip - size more than 50mb) which is in another website to my server using PHP scripting.

That particular file is updating daily in that site, so i need it to download and use it daily basis.

any help is appreciated.

thanks
vego

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by nonshatter
0

If you are using Linux, you can set up a cron job. The cron daemon provides the ability for a system administrator or any other user (if permitted to do so) to automate the routine running of scripts, tasks or any other server function on a regular basis. You can use 'crontab -e' to set up your scheduled task. Or on windows you can use the "scheduled tasks" tool, although I don't think this is as good.
Then you will also need some sort of script or program to execute and download your file every X number of hours or X number of days.
Do you know where the file is located? Do you have access to their web server directories? FTP?

There is a tool I use for this sort of thing called wget (again, I use linux for this). An example command you could use would be something like:

wget -c -r –passive-ftp -nH ftp://:@//ftp_dir/*.zip

Look here for more example usage: http://www.editcorp.com/Personal/Lars_Appel/wget/v1/wget_7.html

Edited by nonshatter: n/a

0

Hi Vego, this shouldn't be a problem if they're making the file readily available to you! wget shouldn't have a problem downloading large files either.
First install wget (if it isn't already installed by default), then play around with the syntax options. When you can download the file you want, you can set up the scheduled task so that it will automate the download.
Hope that helps

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.