1. Go to this page and download the library: Download martinmuzatko/filehandler 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/ */
martinmuzatko / filehandler example snippets
use martinmuzatko\filehandler\File;
use martinmuzatko\filehandler\Handler as FileHandler;
$file = 'path/to/image.jpg';
$info = FileHandler::getInfo($file);
if ($info->width > 1920 || $info->height > 1080)
{
echo 'File '.$info->basename.' is too big, resize it to 1920x1080';
}