Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

resume-download

How to resume interrupted download automatically in curl?

February 21, 2023 by Tarik

curl -L -O your_url This will download the file. Now let’s say your connection is interrupted; curl -L -O -C – your_url This will continue downloading from the last byte downloaded From the manpage: Use “-C -” to tell curl to automatically find out where/how to resume the transfer. It then uses the given output/input … Read more

Categories linux Tags curl, linux, resume-download Leave a comment

Resumable downloads when using PHP to send the file?

December 27, 2022 by Tarik

The first thing you need to do is to send the Accept-Ranges: bytes header in all responses, to tell the client that you support partial content. Then, if request with a Range: bytes=x-y header is received (with x and y being numbers) you parse the range the client is requesting, open the file as usual, seek … Read more

Categories php Tags download, php, resume-download Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa