forked from TwilioDevEd/video-access-token-server-php
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrandos.php
executable file
·33 lines (28 loc) · 1.32 KB
/
randos.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
// Generate a random username for the connecting client
function randomUsername() {
$ADJECTIVES = array(
'Abrasive', 'Brash', 'Callous', 'Daft', 'Eccentric', 'Fiesty', 'Golden',
'Holy', 'Ignominious', 'Joltin', 'Killer', 'Luscious', 'Mushy', 'Nasty',
'OldSchool', 'Pompous', 'Quiet', 'Rowdy', 'Sneaky', 'Tawdry',
'Unique', 'Vivacious', 'Wicked', 'Xenophobic', 'Yawning', 'Zesty',
);
$FIRST_NAMES = array(
'Anna', 'Bobby', 'Cameron', 'Danny', 'Emmett', 'Frida', 'Gracie', 'Hannah',
'Isaac', 'Jenova', 'Kendra', 'Lando', 'Mufasa', 'Nate', 'Owen', 'Penny',
'Quincy', 'Roddy', 'Samantha', 'Tammy', 'Ulysses', 'Victoria', 'Wendy',
'Xander', 'Yolanda', 'Zelda',
);
$LAST_NAMES = array(
'Anchorage', 'Berlin', 'Cucamonga', 'Davenport', 'Essex', 'Fresno',
'Gunsight', 'Hanover', 'Indianapolis', 'Jamestown', 'Kane', 'Liberty',
'Minneapolis', 'Nevis', 'Oakland', 'Portland', 'Quantico', 'Raleigh',
'SaintPaul', 'Tulsa', 'Utica', 'Vail', 'Warsaw', 'XiaoJin', 'Yale',
'Zimmerman',
);
// Choose random components of username and return it
$adj = $ADJECTIVES[array_rand($ADJECTIVES)];
$fn = $FIRST_NAMES[array_rand($FIRST_NAMES)];
$ln = $LAST_NAMES[array_rand($LAST_NAMES)];
return $adj . $fn . $ln;
}