Hello,
I want to create a module that will have a method that should work like a
download manager.
It will be able to automaticly resume downloads, meaning that if a local
file with a given name exists, it will start downloading the remote file
skipping the number of bytes that file contains, and adding the rest of the
remote file to the local one.
I have seen that the recommended way for saving a file using LWP is to use
something like:
$ua->get($url, ":content_file" => $file);
But I would like to know if there is a more flexible way that allow setting
some headers (like the referer, and setting the Range of bytes that will be
downloaded, eventually setting and getting cookies, etc).
It would be very good if that more flexible way wouldn't require storing the
content of that file into a variable, but saving it directly into a file.
What methods do you suggest me to try?
Thank you.
Teddy
|