Skip to main content

how to remote download a file using multi-part downloading?



i want to download a remote file on internet to my host. but i want to download it with multi-part downloading to make it download faster. just the same as download managers .




Comments

  1. You have to use Range header while requesting.

    Sending Range: bytes=500-999 will download the bytes form 500 to 999;

    Note: PHP is not a multi-threaded language. So even you download by multi-part it'll be sequential. Unless you fork multiple process. Though using third-party extensions like curl you can do this through curl_multi_exec

    ReplyDelete
  2. This will be dependent on the server that you are downloading from supporting Range Requests. Read up on Range Requests, and combine this with a multi-threaded cURL, and you'll be able to have more than one download stream working at a time.

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?