Btw, a 'phone home' strategy does not necessarily require owning a website. Free services and free tiers from paid services can store the keys and the same goes for custom key generation if that was necessary. Each alternative will have a different set of instructions to follow, but I believe it would be more secure...
OP keeps asking for a functional syntax and functions could do it.Writing 16 functions to change the array values is useless, you can just use a select case.