PHP Script: Generate random usernames
You can use this script to generate random usernames.
1. Main Script
main.php contains the main source code.
Edit following variables to customize your script:
$common_string : Any string to attach at the end of username generated
$total_names : Total number of usernames to be generated
You can pass these GET/POST request variables to the script:
total: (int) No of usernames to be generated
Gender: ‘male’ or ‘female’ or ‘both’
usernameType: Type of randomization for username. Types described in section 3.
2. Text files
There are 3 text files which contain first names for male and female people and last names.
The script randomly generates usernames using firstname-lastname and a random number combinations.
3. Randomization Types
It has following types:
// 0: FirstName 1st letter + Last name
// 1: FirstName Full + Last name first letter
// 2: FirstName + 2 digits
// 3: Last name + 2 digits
// 4: FirstName 1st letter + Last name + 2 digits
// 5: FirstName Full + Last name first letter + 2 digits
// default: All Random
(2 digits is any random 2 digit number)
Then the script might generate a name like
4. Script Download
Download script here: