Skip to content

Generate serial number or key or random string with number.

License

Notifications You must be signed in to change notification settings

Rundiz/serial-number-generator

Repository files navigation

Serial number generator

Generate serial number or key or random string with number.

Latest Stable Version License Total Downloads

Properties

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

Example

Install

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';

Usage

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;

About

Generate serial number or key or random string with number.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages