camilord / utilus
Camilo3rd's PHP Utils Library
Installs: 47 331
Dependents: 2
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Requires
- php: >=7.4
- ext-ctype: *
- ext-curl: *
- ext-json: *
- ext-openssl: *
Requires (Dev)
- doctrine/dbal: 2.5.4
- phpunit/phpunit: ^5
- dev-master
- 1.0.43
- 1.0.42
- 1.0.41
- 1.0.40
- 1.0.39
- 1.0.38
- 1.0.37
- 1.0.36
- 1.0.35
- 1.0.34
- 1.0.33
- 1.0.32
- 1.0.31
- 1.0.30
- 1.0.29
- 1.0.28
- 1.0.27
- 1.0.26
- 1.0.25
- 1.0.24
- 1.0.23
- 1.0.22
- 1.0.21
- 1.0.20
- 1.0.19
- 1.0.18
- 1.0.17
- 1.0.16
- 1.0.15
- 1.0.14
- 1.0.13
- 1.0.12
- 1.0.11
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
This package is auto-updated.
Last update: 2024-12-29 01:34:42 UTC
README
Camilo3rd's PHP Utils Library
Installing the library
{
"require": {
"camilord/utilus": "^1.0"
}
}
or
composer require camilord/utilus
Usage
This library is my collection from my various projects. It is a mini library which every time I create a project, I don't have to recreate these classes and functions, all I need to do is add this package and start my work. Few example below:
GENERATING UUID
// I need UUID
echo UUID::v4();
OUTPUT:
b9ef0e9e-3249-31a1-a529-640a129890ac
UPLOADING FILE
// 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();
OUTPUT:
/tmp/junkies/tmp_073240_03927845092742.jpg
GET DOMAIN SSL EXPIRY DAYS LEFT
// 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';
}
OUTPUT:
370 days left