I'm sending out a lot of messages, containing links, to my mailing list and I need each link to be unique so that I know who is using it. And I need the link to be as short as possible, as it will be sent via a text message.
The link could be something like this: domain.com?id=1234567
I'm just wondering what would be the best approach to do this as if I send out something like the link above, I'm sure someone would try out domain.com?id=1234568 to see what happens. I don't want people to use someone else's link as I am asking people to provide personal information which would be added to my current database, so I need to know who is using it.
I thought of using two parameters: e.g. domain.com?id=1234567&key=123 or some simple string replacement so that 1234567 would be converted to abcdefg (or something a bit more complicated).
I have a lot of info in my database that would be unique to each individual, but most of it could be guessed on its own. E.g. a unique id, time of creation, phone number, etc.
I thought of a lot of ways to do this but I'm not sure what is good enough but still short.
Do you have any proposals?
P.S. I know this is not really a PHP question, but I tag it as such just in case you think code is needed for your answer (and I don't know what else I should be tagging it as). The landing page will be created with PHP.