mzapeka / img_php_loader
Simple loader of images from remote hosts
Requires
- php: >=7.1
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2025-06-27 05:57:04 UTC
README
This package is oriented for simple loading images from remote hosts via HTTP protocol. It uses PSR-7.
Requirements
Minimum PHP 7.1 is required.
CURL extension are needed.
This package uses some non-stable packages, so you must set your project's minimum stability to something like beta or dev in composer.json
:
"minimum-stability": "dev",
"prefer-stable": true
If you don't the installation procedure below will fail.
Install
This adapter satisfies the requirement for client-implementation and will make it possible to install the client with:
composer require mzapeka/img_php_loader
Usage - simple
Simplest possible use case:
$imgLoader = new ImgLoader(); try { //setup the path to folder with images $imgLoader->setPicFolder('test_folder'); //setup the URL of remout host with images $imgLoader->setUrl('https://test.com/catalog/index.php'); $imgLoader->uploadImages(); } catch (Exception $e){ echo $e->getMessage(); }
That's it, this is all you need to get started.
Testing
Just run PHPUnit in the root folder of the cloned project.
Some calls do require an internet connection (see tests/Factory/EntityTest
).
phpunit
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email mzapeka@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.