PHP code example of camilord / utilus

1. Go to this page and download the library: Download camilord/utilus 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/ */

    

camilord / utilus example snippets

$php
// I need UUID
echo UUID::v4();
$php
// I need to process upload file
$tmp_dir = '/tmp/junkies/';
$uploader = new FileUpload($_FILES);
$uploader->setTemporaryUploadDir($tmp_dir, true);
$fileObj = $uploader->processUpload('document_name');
echo $fileObj->getFilePath();
$php
// I need to know the number of days left for my domain SSL
$sslUtil = new SSLUtil();
$url = 'https://www.abcs.co.nz';
$days = $sslUtil->getSslDaysLeft($url);
if ($days === false) {
    echo "Error! Cannot fetch SSL information.";
} else {
    echo $days.' days left';
}