At the level at which you are asking questions, I'm not sure you'll hear this answer, but, here goes...
Besides all of that, you'll also need to tell the server to send only the data that you don't have. Otherwise, it'd be simpler just to move your file out of the way and start over.
See "Re: Re: Re: download part of remote files" for a snippet of code that uses the Range: header to ask for the last 128 bytes. You'll need to do something similar to ask for the bytes
that you don't have. The response may or may not be a "partial content" response:
if it is, you can append it to your existing data; otherwise, you'll need to replace
your existing data. Oh, and you'll have to verify that the modification date of the
response is the same as your original response. I hope you saved the original modification date somewhere.
What you ask is do-able, but not easy. And not at the level you are asking questions.
Good luck.
-- Randal L. Schwartz, Perl hacker | [reply] |
Maybe to make it easier is:
On *nix machines there will be always the wget. I love that command. Use it for everything. FTP, WWW and it has resume and recursive downloading. Use system to execute it!
-- My opinions may have changed,
but not the fact that I am right
| [reply] |
the script is in fact a CGI script and it sends files to STDOUT and keeps the track using a counter now some one told me that Apache tells very late when the connection is expired, so if that is the way my script will not work good, it will cause data loss so how to work that out ??
how to detect from Perl if the Apache has disconnected
Ahmad Mushtaq
ahmadpak@hotmail.com
http://axidpk.hypermart.net
| [reply] |