SPUG: Perl Download Manager
Ken Clarke
kenslinux at home.com
Wed Nov 21 22:03:49 CST 2001
RFC 2616 (http://www.w3.org/Protocols/rfc2616/rfc2616.html) replaces RFC
2068.
Maybe start with something like this:
use HTTP::Request::Common;
$ua = LWP::UserAgent->new();
$res = $ua -> get($URL);
$body = $res -> content();
$offset = 0;
while ($res -> code() == 206) {
$offset += $ua -> content_length;
$res = $ua -> get($URL, Range => $offset.':bytes');
$body .= $res -> content();
}
>> Ken Clarke
>> Contract Web Programmer / E-commerce Technologist
>> www.perlprogrammer.net
----- Original Message -----
From: "Parr, Ryan" <Ryan.Parr at wwireless.com>
To: <spug-list at pm.org>
Sent: November 21, 2001 2:15 PM
Subject: RE: SPUG: Perl Download Manager
> I was always under the impression that downloads can be resumed only if it
> comes from an FTP site which supports resumable downloads. Perhaps your
> download manager should utilise Net::FTP as well which supports resumable
> downloads:
>
> $ftp->get('/pub/download.gif','/tmp/download1234.gif',(stat
> '/tmp/download1234.gif')[7]);
>
> I could just be behind the times on this though.
>
> -- Ryan
>
>
> -----Original Message-----
> From: c k [mailto:thasone at yahoo.com]
> Sent: Wednesday, November 21, 2001 2:38 PM
> To: spug-list at pm.org
> Subject: SPUG: Perl Download Manager
>
>
> Anybody have suggestions for creating a download
> manager in perl?
>
> I've done work before using libwww (to download
> stuff), but I don't know how to got about resuming a
> broken download. I'm stumped on that and I don't know
> why. Maybe I haven't read the libwww docs enough or
> haven't searched long and hard enough for free
> available source code.
>
> I'm using Go!Zilla, a "free" download manager right
> now, but it's spyware. I don't like that. I keep
> using it because I haven't found another program that
> can replace it (that also isn't spyware and is free).
>
> Any suggestions is greatly appreciated. Thanks!
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
> http://geocities.yahoo.com/ps/info1
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
> Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
> For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
> Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
> Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
> Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
> For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
> Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/
>
>
>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
POST TO: spug-list at pm.org PROBLEMS: owner-spug-list at pm.org
Subscriptions; Email to majordomo at pm.org: ACTION LIST EMAIL
Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
For daily traffic, use spug-list for LIST ; for weekly, spug-list-digest
Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/
More information about the spug-list
mailing list