What exactly are your requirements? For example, a very simple way to have unique ids is to use a strictly increasing sequence of integers, e.g., 1, 2, 3, ..., n. If you are using a database, an auto-incrementing/serial column would do the trick. On the other hand, you might be looking for something along the lines of [man]uniqid/man instead.