If you use this code in an environment where you have a user account with a unique identifier, you can add time () to their account identifier to create a unique identifier.
You can turn the time () back to the date string using:
$time = time();
echo 'The datestamp for (' . $time . ') is ' . date("Y-m-d", $time);
Of course, the date format can be changed using any PHP date () format.
source
share