PHP code example of artyomshaitor / image-package

1. Go to this page and download the library: Download artyomshaitor/image-package library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

artyomshaitor / image-package example snippets


use SRC\ImageDownloader;

oader();
$loader->downloadImage("https://pp.vk.me/c7003/v7003346/15ecb/fBZpkWNulu4.jpg"); // simple image downloading
$loader->downloadImage("https://pp.vk.me/c7003/v7003346/15ecb/fBZpkWNulu4.jpg",['jpg', 'png']); // download only image with ".jpg" or ".png" types 
$loader->downloadImage("https://pp.vk.me/c7003/v7003346/15ecb/fBZpkWNulu4.jpg", [], 'images'); // download image to 'images' folder