View Full Version : 16 digit unique number
10-28-2007, 07:19 PM
i am doing image upload, thus i want to rename my images, how can i generate 16digit unique number
you could use the php function tempnam, which will create a file with a unique filename- though it isnt 16 digits unless you prefix as such: http://uk2.php.net/tempnam
you could use uniqid() which will generate either a 13 or 23 digit number, and pad or trim as you see fit.
You could use some function of the current time (microtime()) to produce 16 digits.
Have you chosen 16 for a reason?
10-28-2007, 07:31 PM
i dont want the image name to be too long, at this moment i am able to get 32 unique number
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.