Skip to content

Speedysnail6/username-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Username Generator

Username Generator is a simple PHP file that randomly generates a username. It can be easily accessed by other files as seen in the demo folder. If you point your browser to generate.php, it will generate a username. All the adjectives, nouns, and numbers can be added/removed one-per-line in text files. Sometimes, a username does not contain an adjective, noun, and/or number. This is not a glitch. Special parameters can be sent to generate.php via the URL or $_GET.


Try it out

You can see a the current version installed on my website. Also, it's free to use under the MIT License, so you can use it on your own projects/sites.


Special Parameters

If data is sent to generate.php through the URL for example generate.php?prefix=xx_&gm=2 or by sending it directly through a form with the method $_GET. The current parameters are:

prefix - what's before the username ex. (the_awesome_)

suffix - what's after the username ex. (_is_me)

gm - generation method: how the username is generated ex. (1)

- Generation Method 1: Adjective, Noun Number

- Generation Method 2: Adjective, Noun

imporantnouns - This can currently only be one noun. This could be your name, favorite food, etc. There is a one in three change it will be replaced with the noun section in the generated username ex. (firetruck)


Making a request

The username generator is very simple. All you have to do to generate a username is to fetch the contents of generate.phppossibly with parameters above.

$username = file_get_contents('generate.php?gm=2');
echo $username;

And as long as you do a http request to generate.php (and maybe include some parameters), you're good to do.

Help us

Feel free to clone this and make pull requests for any changes you made. We appreciate all help, even if there's only a really small change. If you make lots of pull requests, you become part of the team.

About

Easily generate random usernames

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published