EpicUsernameGenerator is a PHP library for generating unique and captivating usernames. This solution is ideal for creating attractive, memorable usernames for various applications, games or online platforms.
- Generation of unique pseudonyms based on configurable dictionaries.
- Ability to specify the length of the generated pseudonym.
- Support for different case styles (lowercase, uppercase, capital).
- Addition of random digits for further customization.
- Flexibility to customize configuration as required.
- Clone the repository from GitHub :
git clone [email protected]:ImperialCrise/EpicUsernameGenerator.git
- Include the
nouns.php
andadjectives.php
files in your PHP script.
include 'nouns.php';
include 'adjectives.php';
- Use the
epicUsernameGenerator()
function, passing the desired configuration.
$username = epicUsernameGenerator($config);
<?php
include 'nouns.php';
include 'adjectives.php';
// Configuration
$config = [
'dictionaries' => [
$nouns,
$adjectives
],
'randomDigits' => 6,
'length' => 8,
'style' => 'lowerCase'
];
// Generate 30 unique pseudonyms
for ($a = 0; $a < 30; $a++) {
$username = epicUsernameGenerator($config);
echo $username . "<br>";
}
?>
Here are some examples of the pseudonyms generated:
Rderi509
Psycmagi
Powreti1
Lobshard
Polbux78
Matcumu1
Clowdang
Blaattri
Canaccu5
Appocomi
Kerdese7
Cololoc2
Excafurr
Specifap
Matfurn4
Judgthou
Characto
Defodesc
Subplong
Brothor7
Blacesta
Rifstea8
Stform25
Thorillu
Statprin
Determde
Stepfol8
Spocom27
Receboi4
Flapimag
Pseudonym generator configuration is defined in the $config
associative array. Here is a description of the available parameters:
'dictionaries'
: An array containing the word dictionaries used to generate pseudonyms. You can include your own dictionaries by adding the corresponding files and including them in your script. The dictionaries supplied (nouns.php
andadjectives.php
) are used in the example.'randomDigits'
: The number of random digits to add to the end of the pseudonym.'length'
(optional): The maximum length of the generated pseudonym. If this parameter is omitted, the default value is 15 characters.'style'
(optional): The case style of the generated nickname. Available options are'lowerCase'
(lowercase),'capital'
(first letter in uppercase) and'upperCase'
(all uppercase). If this parameter is omitted, case will be converted to lowercase by default.
Don't hesitate to adjust the configuration to suit your needs, and create your own unique pseudonyms.
Contributions are welcome! If you'd like to improve EpicUsernameGenerator or add new features, feel free to submit a pull request on GitHub.
EpicUsernameGenerator is distributed under the MIT license. Please consult the LICENSE
file for more information.
This project is inspired by and based on the original PHP script provided by the user ImperialCrise.