25.05.2015, 17:26
Use random() to get a some number and give it to the player. Save the number into a file or a database. The next time when someone gets a random value for their phone number, go through the database/file and check if the number exists. If it does, generate a new number.