Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
What's the simplest way to put in the url of a file and have it downloaded via the script? For now, it'll just download images. So if I put in $url = "www.page.com/images/image.gif"; it would save image.gif to my folder on the server.
This is how I created a file UPLOADER.
open( SAVED, ">>$localfile" ); while ( $bytesread = read( $remotefile, $buffer, 1024 ) ) { print SAVED $buffer; } close SAVED;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File downloader
by tachyon (Chancellor) on Nov 12, 2004 at 23:29 UTC | |
|
Re: File downloader
by pg (Canon) on Nov 13, 2004 at 03:59 UTC | |
|
Re: File downloader
by atcroft (Abbot) on Nov 12, 2004 at 23:30 UTC | |
|
Re: File downloader
by dave_the_m (Monsignor) on Nov 12, 2004 at 23:29 UTC | |
|
Re: File downloader
by punch_card_don (Curate) on Nov 15, 2004 at 14:36 UTC | |
|
Re: File downloader
by xorl (Deacon) on Nov 15, 2004 at 20:22 UTC | |
|
Re: File downloader
by Anonymous Monk on Nov 15, 2004 at 19:22 UTC |