Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Random 10 letter + numbers UPPERCASE string
- function create_random_string($lenght)
- {
- return strtoupper(substr(SHA1(uniqid()), 0, $lenght));
- }
- // Echo it
- echo create_random_string(10);
- // Or store it
- $string = create_random_string(10);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment