PHPackages                             nfreear/http-file-dispatcher - 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. nfreear/http-file-dispatcher

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

nfreear/http-file-dispatcher
============================

A simple library to serve static image files &amp; documents over HTTP/S via PHP. | © Nick Freear (IET-OU).

1.2.2(4y ago)0431[3 issues](https://github.com/nfreear/http-file-dispatcher/issues)MITPHPPHP &gt;=7.2

Since May 25Pushed 4y ago1 watchersCompare

[ Source](https://github.com/nfreear/http-file-dispatcher)[ Packagist](https://packagist.org/packages/nfreear/http-file-dispatcher)[ RSS](/packages/nfreear-http-file-dispatcher/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (3)Versions (5)Used By (0)

[![PHP Composer](https://github.com/nfreear/http-file-dispatcher/actions/workflows/php.yml/badge.svg)](https://github.com/nfreear/http-file-dispatcher/actions/workflows/php.yml)

http-file-dispatcher
====================

[](#http-file-dispatcher)

A simple library to serve static image files &amp; documents over HTTP/S via PHP.

```
composer require nfreear/http-file-dispatcher
```

Example
-------

[](#example)

An OctoberCMS frontend plugin:

```
use Nfreear\HttpFileDispatcher\FileDispatcher;

class Plugin extends PluginBase
{
    // ...

    public function boot()
    {
        // ...

        App::before(function () {

            FileDispatcher::debug(__METHOD__);

            $dispatcher = new FileDispatcher();

            $dispatcher->setUriRequestPrefix('/file?f=');

            $dispatcher->setFilePath(__DIR__ . '/../../../themes/applaud/content/static-pages/files/');

            $dispatcher->run();
        });

        // ...
    }

    // ...
}
```

License
-------

[](#license)

- License: `MIT`
- Original [Gist](https://gist.github.com/nfreear/742cf6839c871467df0f020b349ef15e "Date: 2016-05-25").

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 90.9% 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 ~623 days

Total

4

Last Release

1813d ago

PHP version history (2 changes)1.0.0-betaPHP &gt;=5.4.0

1.2.0PHP &gt;=7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/669993be674731e4eace2bbe7e33d89693c9c654ff031179c410e21b2539a150?d=identicon)[nfreear](/maintainers/nfreear)

---

Top Contributors

[![nfreear](https://avatars.githubusercontent.com/u/131235?v=4)](https://github.com/nfreear "nfreear (10 commits)")[![ricgreenwood](https://avatars.githubusercontent.com/u/1014040?v=4)](https://github.com/ricgreenwood "ricgreenwood (1 commits)")

---

Tags

svgOpenUniversityIET-OUoctober

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/nfreear-http-file-dispatcher/health.svg)

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

###  Alternatives

[symfony/http-kernel

Provides a structured process for converting a Request into a Response

8.1k853.6M8.3k](/packages/symfony-http-kernel)[symfony/http-client

Provides powerful methods to fetch HTTP resources synchronously or asynchronously

2.0k330.1M4.6k](/packages/symfony-http-client)[zircote/swagger-php

Generate interactive documentation for your RESTful API using PHP attributes (preferred) or PHPDoc annotations

5.3k140.4M554](/packages/zircote-swagger-php)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.3k66.1M253](/packages/nelmio-api-doc-bundle)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[api-platform/metadata

API Resource-oriented metadata attributes and factories

244.5M182](/packages/api-platform-metadata)

PHPackages © 2026

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