PHP » PYTHON |
login |
register |
about
|
from uniqid.c on php source code
import time def uniqid(prefix = ''): return prefix + hex(int(time.time()))[2:10] + hex(int(time.time()*1000000) % 0x100000)[2:7] uniqid(PHP 4, PHP 5) uniqid — Generate a unique ID Description
string uniqid
([ string $prefix= ""
[, bool $more_entropy= false
]] )
Gets a prefixed unique identifier based on the current time in microseconds. Parameters
Return ValuesReturns the unique identifier, as a string. ExamplesIf you need a unique identifier or token and you intend to give out that token to the user via the network (i.e. session cookies), it is recommended that you use something along these lines: This will create a 32 character identifier (a 128 bit hex number) that is extremely difficult to predict. Example #1 uniqid() Example
<?php
Changelog
|
more
Recently updated
more
Most requested
more
Last requests
|