PHPackages                             balpom/downloader - 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. balpom/downloader

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

balpom/downloader
=================

Downloads the contents of the specified URI through a simple interface.

v0.8.0(2y ago)010MITPHPPHP &gt;=8.0.3

Since Apr 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/balpom/downloader)[ Packagist](https://packagist.org/packages/balpom/downloader)[ Docs](https://www.balpom.ru)[ RSS](/packages/balpom-downloader/feed)WikiDiscussions main Synced 1mo ago

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

downloader
==========

[](#downloader)

Simple interface for content downloading on the specified URI and it's trivial realisation.
-------------------------------------------------------------------------------------------

[](#simple-interface-for-content-downloading-on-the-specified-uri-and-its-trivial-realisation)

This downloader will be useful for websites parsing, working with the REST API and other work with WEB resources via the HTTP protocol. This version of the package contains an interface implementation based on PSR-18. It is planned to make an implementation that works through [Selenium WebDriver](https://github.com/php-webdriver/php-webdriver).

### Requirements

[](#requirements)

- **PHP &gt;= 8.0.3**

### Installation

[](#installation)

#### Using composer (recommended)

[](#using-composer-recommended)

```
composer require balpom/downloader
```

### Usage sample

[](#usage-sample)

This downloader requires objects that implement the ResponseFactoryInterface, StreamFactoryInterface and UriFactoryInterface interfaces which defined in the [PSR-17 specification](https://www.php-fig.org/psr/psr-17/). An excellent library that implements all these interfaces at once (all-in-one) is [Nyholm/psr7](https://github.com/Nyholm/psr7) - will use it.

This downloader also requires an HTTP client that implements the ClientInterface which defined in the [PSR-18 specification](https://www.php-fig.org/psr/psr-18/). For example, will use [phpwebclient/webclient](https://github.com/phpwebclient/webclient).

#### Installing third-party packages

[](#installing-third-party-packages)

```
composer require nyholm/psr7
```

```
composer require webclient/webclient
```

#### Downloader creation

[](#downloader-creation)

```
$factory = new \Nyholm\Psr7\Factory\Psr17Factory();
$client = new \Webclient\Http\Webclient($factory, $factory);
// Psr18Factories(RequestFactoryInterface $request, StreamFactoryInterface $stream, UriFactoryInterface $uri)
$factory = new \Balpom\Downloader\Factory\Psr18Factories($factory, $factory, $factory);
$downloader = new \Balpom\Downloader\Psr18Downloader($client, $factory);
```

#### Download URI

[](#download-uri)

For test purpose will make request to site .

```
$downloader = $downloader->get('http://ipmy.ru/ip');
echo $downloader->code(); echo PHP_EOL; // Must be 200.
echo $downloader->content(); echo PHP_EOL; // Must be your IP.
```

Extended sample you may find in "tests/psr18test.php" file - just run it:

```
php tests/psr18test.php
```

### License

[](#license)

MIT License See [LICENSE.MD](LICENSE.MD)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

756d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5604ae7cc0bdc12fd8cf8867f3518ec3c9628f13707f127e700cdac1aec70b56?d=identicon)[balpom](/maintainers/balpom)

---

Top Contributors

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

---

Tags

httppsr-7urlurihttpsclientpsr-17psr-18psr7psr17Simplemethoddownloadscriptgetdownloaderpostpsr18head

### Embed Badge

![Health badge](/badges/balpom-downloader/health.svg)

```
[![Health](https://phpackages.com/badges/balpom-downloader/health.svg)](https://phpackages.com/packages/balpom-downloader)
```

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.0B3.1k](/packages/guzzlehttp-psr7)[league/uri

URI manipulation library

1.1k206.4M276](/packages/league-uri)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

538204.9M23](/packages/league-uri-interfaces)[phpro/http-tools

HTTP tools for developing more consistent HTTP implementations.

28137.8k](/packages/phpro-http-tools)[pdeans/http

PSR-7 cURL HTTP client with support for PSR-17 HTTP factories.

1466.2k3](/packages/pdeans-http)[vultr/vultr-php

The Official Vultr API PHP Wrapper.

2243.9k1](/packages/vultr-vultr-php)

PHPackages © 2026

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