Generate a nickname from a real name in php
July 3, 2008 3:11 AM
Subscribe
I am looking for a way to generate nicknames from real names, preferably in PHP.
I am setting up a community website that uses facebook for autentication. Facebook sends me the name for every new user but I dont want to show it in full to the whole world so I need to give each user a nickname.
Of course the user could choose a name themselfs but i I would prefer to have the system giving them a name that sounds a bit like their real name but obfuscates it enough to make it non recognisable online. Preferably it will also be human spokable without any numbers or such.
I was toying with the idea to take the first syllable in the users first name and then add something random to it. Extracting syllables though seem pretty hard. Anyone have other ideas or even better a finished class or script for this thing.
posted by ilike to computers & internet (10 comments total)
1 user marked this as a favorite
posted by katrielalex at 3:30 AM on July 3, 2008