PHP Salt


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

Version: 2.33.2
Last Build: December 29, 2023 20:28pm (PST)

Main Menu

Home

Get PHP Salt


The Functions

array
db
file
graph
html
mail
math
misc
mobile
script
string
system
time
web
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:

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