Perl Script to resume download


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Perl Script to resume download
# 1  
Old 01-29-2009
Perl Script to resume download

Hi,

i am looking for a perl script[only] that can resume broken download images from a remote server. Can anyone help me on this.

thanks,
Vince
# 2  
Old 01-29-2009
First, why Perl only? wget does supply that functionality pretty nicely.
Second, since I know of no Perl Module to do that by default, it would work something like this:
  • Find out how much has already been downloaded
  • Create an HTTP Request (e.g. HTTP::Request from the LWP Bundle)
  • Set an additional header for the offset (Content-Range as specified in RFC 2616). HTTP::Headers from the LWP Bundle can do that.
  • Send the request and append the answer to the file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Run script when computer resume from being sleep state

I use this as a startup program. Is there a way that it could run when my computer returns from a sleep state? Cpu_LogFile="/home/andy/bin/CPU_Fan_Info.txt" date +"%Y-%m-%d-%H:%M:%S" >> $Cpu_LogFile sensors -f | grep "temp4" >> $Cpu_LogFile sensors -f | grep "fan1" >> $Cpu_LogFile (5 Replies)
Discussion started by: drew77
5 Replies

2. UNIX for Advanced & Expert Users

Resume parent shell after sourcing another script

#! /bin/ksh #first.sh echo "b4 set exit as return" alias exit=return echo "call second" . ./second.sh echo "after second" #. ./third.sh unalias exit echo "ho lanciato il terzo" =================// #second.sh echo "in scond" exit ==============// the above code works in k... (2 Replies)
Discussion started by: mprakasheee
2 Replies

3. Shell Programming and Scripting

Perl CGI : unable to download the excel sheet from perl cgi page

Hi All, I have written an cgi perl script that displays an image(Excel image) and when clicked on that Image I need to download a excel sheet. I made sure that excel sheet exists in the folder with the given name but still I am not able to download the sheet. print "<center><table... (2 Replies)
Discussion started by: scriptscript
2 Replies

4. Shell Programming and Scripting

FTP download using perl script

Need assistance I have a script which i can download the files from ftp server using perl . But i want to download multiple files at a time #!/usr/bin/perl -w use Net::FTP; $ftp = Net::FTP->new("ftp.ncdc.noaa.gov"); $ftp->login('username', 'password'); $ftp->cwd("<dir>");... (9 Replies)
Discussion started by: ajayram_arya
9 Replies

5. Hardware

Cannot resume from suspend with new motherboardktop, does not resume properly

I would like to get pm-suspend (or any other suspend method) working for a small new desktop computer. It is based on a Zotac GF-8200 ITX motherboard and an AMD Athlon II X@ 240 CPU using ArchLinux x86_64. The pm-suspend script works, apparently putting the machine into suspend correctly... (0 Replies)
Discussion started by: lagagnon
0 Replies

6. UNIX for Dummies Questions & Answers

Unable to download modules from Strawberry perl.

Hi, I am using Strawberry Perl on WinXP but i am unable to download modules from Cpan via cmd,everytime a connection timeout error pops up. I get the following error : C:\>cpan Tk CPAN: LWP::UserAgent loaded ok (v5.834) CPAN: Time::HiRes loaded ok (v1.9719) Fetching with LWP:... (0 Replies)
Discussion started by: parimal14
0 Replies

7. Shell Programming and Scripting

How to download to a file using wget in perl?

Hi, I want to download some online data using wget command and write the contents to a file. For example this is the URL i want to download and store it in a file called "results.txt". #This is the URL. $url="http://www.example.com"; #retrieve data and store in a file results.txt ... (3 Replies)
Discussion started by: vanitham
3 Replies

8. Shell Programming and Scripting

Perl and Nvidia driver download

Hi guys i have writen a script that can be used to automatically check a website for the latest software ( in this case i want to use it with the nvidia website ) and check the software and if there is a new version out then it will download it for me but i cannot seem to get it to work... (1 Reply)
Discussion started by: ab52
1 Replies

9. What is on Your Mind?

Are companies viewing my resume? How do I track my resume visits?

Hi everybody, I am wondering if there is any tool or website out there which can track who is viewing my resume. It is very frustrating when you send your CV or Cover Letter and you receive no feedback from the company, you don't even know if they have checked it out. Thanks for your help (1 Reply)
Discussion started by: gearyipswich
1 Replies

10. UNIX for Dummies Questions & Answers

Download files using perl

What is the easiest way to download some file using perl for it. (2 Replies)
Discussion started by: mirusnet
2 Replies
Login or Register to Ask a Question