PHP code example of jyoungblood / dw-utilities
1. Go to this page and download the library: Download jyoungblood/dw-utilities 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/ */
jyoungblood / dw-utilities example snippets
dw::client_ip();
dw::authenticate();
dw::generate_jwt($user);
dw::convert_image([
'source' => $_SERVER['DOCUMENT_ROOT'] . '/uploads/source-filename.jpg',
'target' => $_SERVER['DOCUMENT_ROOT'] . '/uploads/converted-filename.jpg',
'resize' => [300, 300],
// 'threshold' => 800
'crop' => 'center',
'quality' => 80
]);