PHP code example of maxvtest / image-dl
1. Go to this page and download the library: Download maxvtest/image-dl 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/ */
maxvtest / image-dl example snippets
use Maxvtest\ImageDl\ImageDl;
$url = 'http(s)://free-awesome-images.net/path/name.jpg';
$name = '/path/to/new-file.jpg';
$imageDl = new ImageDl;
$imageDl->sslVerifyPeer = true; // 'true' to download image from https, but without SSL verification.
$imageDl->download($url, $name);