Generate serial number or key or random string with number.
numberChunks is number of chunks. If you just want to generate random string, set this to 1. It required at least number 1.
Example: If number of chunk is 3. XXXXX-XXXXX-XXXXX
numberLettersPerChunk is number of letters per chunk.
Example: If number of letters per chunk is 2 and number of chunk is 3. XX-XX-XX
separateChunkText is separator text to separate chunks.
Example: If separator is colon. XXXXX:XXXXX:XXXXX:XXXXX:XXXXX
I recommend you to install this library via Composer and use Composer autoload for easily include the files. If you are not using Composer, you have to manually include these files by yourself.
Please make sure that the path to files are correct.
require_once '/path/to/Rundiz/SerialNumberGenerator/SerialNumberGenerator.php';
Just write this simple code. You can set properties to change some values.
$SerialNumberGenerator = new \Rundiz\SerialNumberGenerator\SerialNumberGenerator();
$serial_number = $SerialNumberGenerator->generate();
unset($SerialNumberGenerator);
echo $serial_number;