Download the PHP package balpom/universal-downloader without Composer
On this page you can find all versions of the php package balpom/universal-downloader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download balpom/universal-downloader
More information about balpom/universal-downloader
Files in balpom/universal-downloader
Package universal-downloader
Short Description Downloads the contents of the specified URI (or file).
License MIT
Homepage https://www.balpom.ru
Informations about the package universal-downloader
balpom/universal-downloader
Simple interfaces for content downloading on the specified URI (or file location) and it's trivial realisations.
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 for use with any PSR-18 HTTP clients. It is planned to make an implementation that works through Selenium WebDriver.
Requirements
- PHP >= 8.1
Installation
Using composer (recommended)
Simple downloader usage sample
PSR18 downloader usage sample
PSR18 downloader requires objects that implement the ResponseFactoryInterface, StreamFactoryInterface and UriFactoryInterface interfaces which defined in the PSR-17 specification. An excellent library that implements all these interfaces at once (all-in-one) is Nyholm/psr7 - will use it.
PSR18 downloader realisation also requires an HTTP client that implements the ClientInterface which defined in the PSR-18 specification. For example, will use phpwebclient/webclient and guzzle/guzzle.
Installing third-party packages
Downloader creation based on Webclient.
Downloader creation based on GuzzleHttp.
Download URI
For test purpose will make request to site https://ipmy.ru.
Extended sample you may find in "tests/test-psr18.php" file - just run it:
License
MIT License See LICENSE.MD
All versions of universal-downloader with dependencies
psr/http-message Version ^2.0
psr/http-factory Version ^1.0
psr/http-client Version ^1.0