1. Go to this page and download the library: Download snortlin/nano-id 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/ */
use Snortlin\NanoId\NanoId;
// Default size (21), numbers (0123456789)
$nanoId = NanoId::nanoId(NanoId::SIZE_DEFAULT, NanoId::ALPHABET_NUMBERS); // "782295634533276321176"
// Custom size, numbers and English alphabet without unreadable letters: 1, l, I, 0, O, o, u, v, 5, S, s, 2, Z
$nanoId = NanoId::nanoId(12, NanoId::ALPHABET_ALPHA_NUMERIC_READABLE); // "AcFQM9X3pCi8"