I am integrating a third party web service which requires a unique integer for each call and once that integer is consumed, it does not accept that integer ever again. It will be a real-time integration, i-e there can be multiple calls to that web services from multiple users on the website this means that there can also be simultaneous calls if more than one user calls that web-service.
For now I tried PHP's uniqid()
method to generate a unique id for each transaction but as it does not guarantee unique integers always.
Also I tried UNIX's Epoch seconds as required integer which works perfectly but I know it will not work with simultaneous calls.
I don't require random numbers, it can be anything which will never repeat. Please suggest possible solutions.