Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function GetWord($maxlength) {
- $file_content = file('word-list.txt');
- $nword = $file_content[array_rand($file_content)];
- while(mb_strlen($nword) > $maxlength) {
- $nword = $file_content[array_rand($file_content)];
- }
- return $nword;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement