PHP Salt


A little dash of PHP... my collection of php functions

Version: 2.20.2
Last Build: October 16, 2017 12:40pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
file
graph
html
mail
math
misc
mobile
script
string
system
time
psUniqKey()
Uniq Key


Description:

This function generates a uniq key based on linux time and microseconds.
You are able to deduce from the key the date/time created by base converting
from 36 to 10.


Usage:

psUniqKey(STRING);


Example:


$key = psUniqKey();
print ":$key:\r\n";




Code:


function psUniqKey()
{
list($usec, $sec) = explode(" ", microtime());
$res = base_convert(time(),10,36);
$res .= "-" . base_convert($usec*100000000,10,36);

return $res;

}



Changlelog:


See Also

  psUniqKeyTxt()
And a shot out to:

LinuxSimple - www.linuxsimple.com
PHP - php.net
Fedora Server - getfedora.com
Shameless ads to pay for site