PHPackages                             javansolo/http-send-file - 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. javansolo/http-send-file

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

javansolo/http-send-file
========================

PHP lib which sends a file with support for (multiple) range requests and throttle.

0.1.1(4y ago)048MITPHPPHP &gt;=7.0

Since Nov 8Pushed 3y ago1 watchersCompare

[ Source](https://github.com/javansolo/http-send-file)[ Packagist](https://packagist.org/packages/javansolo/http-send-file)[ RSS](/packages/javansolo-http-send-file/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (4)Used By (0)

HTTP send file
==============

[](#http-send-file)

Sends a file with support for (multiple) range requests. It is able to throttle the download. It is quite small and simple.

This class resembles the php http\_send\_file from PHP pecl

See:

Install

With composer add to your "require" section:

```
composer require javansolo/http-send-file

```

Usage example:

```
use Javansolo\HttpSendFile\sendfile;
$s = new sendfile();

// if you don't set type - we will try to guess it
$s->contentType('application/epub+zip');

// if you don't set disposition (file name user agent will see)
// we will make a file name from file
$s->contentDisposition('test.epub');

// chunks of 40960 bytes per 0.1 secs
// if you don't set this then the values below are the defaults
// approx 409600 bytes per sec
$s->throttle(0.1, 40960);

// file
$file = '/some/dir/test.epub';

// send the file
try {
    $s->send($file);
} catch (\Exception $e) {
    echo $e->getMessage();
}
```

So you could just do like this:

```
use diversen\sendfile;
$s = new sendfile();

// file
$file = '/some/dir/test.epub';

// send the file
try {
    $s->send($file);
} catch (\Exception $e) {
    echo $e->getMessage();
}

// but check the headers if it is not
// working as expected as the guessing
// of content-type does not always work
// correctly.
```

Without sending content-disposition header:

```
// without sending content-disposition header
// 2. param = false
try {
    $s->send($file, false);
} catch (\Exception $e) {
    echo $e->getMessage();
}
```

MIT © [javansolo ](https://github.com/javansolo)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 90% 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.

###  Release Activity

Cadence

Every ~4 days

Total

2

Last Release

1639d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/697e5d8998e135fe80e4a8ac23c6d2553285ca0238533f1947c2ef7bbbe0dfec?d=identicon)[javansolo](/maintainers/javansolo)

---

Top Contributors

[![javansolo](https://avatars.githubusercontent.com/u/11363999?v=4)](https://github.com/javansolo "javansolo (9 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (1 commits)")

---

Tags

httpphpfiledownloadthrottleresume

### Embed Badge

![Health badge](/badges/javansolo-http-send-file/health.svg)

```
[![Health](https://phpackages.com/badges/javansolo-http-send-file/health.svg)](https://phpackages.com/packages/javansolo-http-send-file)
```

###  Alternatives

[diversen/http-send-file

Sends a file to a client, with support for (multiple) range requests. It is also able to throttle the download.

57345.2k](/packages/diversen-http-send-file)[hannesvdvreken/guzzle-debugbar

A Guzzle middleware that logs requests to debugbar's timeline

76410.4k1](/packages/hannesvdvreken-guzzle-debugbar)[mhndev/slim-file-response

Slim File Response

112.5k](/packages/mhndev-slim-file-response)

PHPackages © 2026

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