PHPackages                             davidasrocha/php-resumable-download - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. davidasrocha/php-resumable-download

ActiveLibrary[HTTP &amp; Networking](/categories/http)

davidasrocha/php-resumable-download
===================================

PHP Resumable Download library that add supports to consume servers with HTTP Partial Request

20[2 PRs](https://github.com/davidasrocha/php-resumable-download/pulls)PHP

Since Sep 1Pushed 3y ago2 watchersCompare

[ Source](https://github.com/davidasrocha/php-resumable-download)[ Packagist](https://packagist.org/packages/davidasrocha/php-resumable-download)[ RSS](/packages/davidasrocha-php-resumable-download/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

[![experimental](https://camo.githubusercontent.com/be213fddfb34299305d04d4dc7ea0cfe0b9816cad43291c1b928143f4e2507bd/687474703a2f2f6261646765732e6769746875622e696f2f73746162696c6974792d6261646765732f646973742f6578706572696d656e74616c2e737667)](http://github.com/badges/stability-badges)[![Build Status](https://camo.githubusercontent.com/0b4630903637a47095aff6b5674181857de0a110d02c78a37a13e3ded5dd4071/68747470733a2f2f7472617669732d63692e6f72672f64617669646173726f6368612f7068702d726573756d61626c652d646f776e6c6f61642e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/davidasrocha/php-resumable-download)

About library
=============

[](#about-library)

This library implement the HTTP Partial Request to PHP projects, following the [RFC 7233](https://tools.ietf.org/html/rfc7233#section-4.1).

Initially this library is implementing only the Client to consume any server that implement the HTTP Partial Request. You can consume this library inside of your project, pay attention, you are responsible to manage exceptions and consume responses after any partial request.

### Table of Contents

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Client](#client)
- [How can I run tests](#how-can-i-run-tests)

### Installation

[](#installation)

You need to pull the package via composer.

```
$ composer require davidasrocha/php-resumable-download

```

### Usage

[](#usage)

[![Basic HTTP Partial Request](./docs/images/usage-http-partial-request.svg "Basic HTTP Partial Request")](./docs/images/usage-http-partial-request.svg)

#### Client

[](#client)

The client can be used to check server supports to HTTP Partial Request, execute the first partial request, execute a new partial request, re-execute partial request, and resume partial request.

```
use GuzzleHttp\Client;
use Monolog\Handler\StreamHandler;
use Monolog\Logger;

require __DIR__ . "/vendor/autoload.php";

$logger = new Logger('resume.request.client');
$logger->pushHandler(new StreamHandler(__DIR__ . '/logs/client.log'));

$client = new \PHP\ResumableDownload\Client(new Client(['base_uri' => 'http://127.0.0.1:8000/index.php']));
$client->setLogger($logger);

if ($client->serverSupportsPartialRequests()) {
    $client->start();
    $client->next();
    $client->next();
    $client->prev();
    $client->resume(2048, 4097);
    $client->next();
}
```

To get a response of the partial request, you can implement some bellow codes:

```
// execute the first partial request
$client->start();
$response = $client->current();

// execute a new partial request to the next part
$client->next();
$response = $client->current();

// execute a new partial request to the previous part
$client->next();
$client->next();
$client->prev();
$response = $client->current();
```

### How can I run tests

[](#how-can-i-run-tests)

This project has a `Dockerfile` and `docker-compose.yml` to easily run tests:

To start, inside of the project repository, you will run the command to build a new Docker image containing the PHP dependencies:

```
$ docker-compose build --force-rm --no-cache

```

Finally, you can run tests using this command:

```
$ docker-compose run php

```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/cd4577cdb3a236b1ba8822580bbc5008323c1533cd18ab2e24c45be98b6cee4d?d=identicon)[DavidASRocha](/maintainers/DavidASRocha)

---

Top Contributors

[![davidasrocha](https://avatars.githubusercontent.com/u/3500877?v=4)](https://github.com/davidasrocha "davidasrocha (23 commits)")

### Embed Badge

![Health badge](/badges/davidasrocha-php-resumable-download/health.svg)

```
[![Health](https://phpackages.com/badges/davidasrocha-php-resumable-download/health.svg)](https://phpackages.com/packages/davidasrocha-php-resumable-download)
```

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.8k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M89](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
