Web Hosting Talk







View Full Version : Fetching huge file via cron


grabmail
10-14-2006, 07:05 AM
is it better to do it via curl in a php script (cron job will run this script)

or

wget via cron job (no need for php script)?

i heard curl is faster.

grabmail
10-14-2006, 07:07 AM
oh yeah. the file is about 1.5 mb

grabmail
10-14-2006, 08:08 AM
as the file is huge, i need to set_time_limit(60)

during the time when i am downloading the file via curl, will my server hang because of this one long script?

deuce868
10-14-2006, 02:48 PM
I'd just wget the file with cron. A 1.5mb file should move down pretty quick on just about any internet connection a server would be on these days.

azizny
10-14-2006, 04:51 PM
Why not just download it via php fopen?

A file 1.5mb is nothing (unless you are running a home server, even then it should be nothing unless you are using 56k).

Peace,

grabmail
10-14-2006, 07:12 PM
because curl is faster than fopen?

xelav
10-15-2006, 05:40 AM
I don't think, you will see different between curl and fopen. To my mind, fopen faster