Returns a unique ID number.
The uniqid() function is a convenient way of generating unique identification numbers that can be used to identify users. It returns a 13-character hexadecimal number based on the system time. A prefix and additional digits can be added using the parameters.
<?php
print uniqid("") . "<br>";
print uniqid("", TRUE) . "<br>";
print uniqid(rand() . "-", TRUE) . "<br>";
?> 400498612acbf
400498612acd04.94737073
20119-400498612ace30.77753392This example shows a few different ways that uniqid() can be used to create ID numbers. Note the small differences in the time components of the output.