Create a registration key

Last modified date

Comments: 0

This simple function allows you to generate a random registration key in the format, ‘1224-54B1-7D35-5EF7’.

[php]function registration_key()
{
return strtoupper(substr(chunk_split(sprintf(‘%03d%s’,
rand(0,999), uniqid(”)), 4, ‘-‘), 0, -1));
}[/php]

Share

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.