2017 © Pedro Peláez
 

library php-image-downloader

Component for downloading images by URL

image

greeflas/php-image-downloader

Component for downloading images by URL

  • Thursday, February 9, 2017
  • by greeflas
  • Repository
  • 1 Watchers
  • 0 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 8 % Grown

The README.md

Component for downloading images by URL

This is component for downloading images by URL from another servers. This component uses cURL PHP library., (*1)

Total Downloads Latest Stable Version Latest Unstable Version License, (*2)

Installation

The preferred way to install the component is through composer., (*3)

Either run, (*4)

composer require greeflas/php-image-downloader

or add, (*5)

"greeflas/php-image-downloader": "dev-master"

to the require section of your composer.json., (*6)

Using

Create component instance, (*7)

$downloader = new \greeflas\tools\ImageDownloader([
    'class' => \greeflas\tools\validators\ImageValidator::class
]);

in array you should specify the validator class. It used for validation of downloaded files. If you don't want run validation, you can use a \greeflas\tools\validators\FakeValidator::class., (*8)

Then you should call method for downloading, (*9)

$downloader->download($url, $imagesRoot, $fileName);

this method takes as agruments: URL to image, path to catalog where file will be saved and name for downloaded file., (*10)

The Versions

09/02 2017

dev-master

9999999-dev

Component for downloading images by URL

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.6
  • ext-curl *

 

by Vladimir Kuprienko

php image download downloader