×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
1
Language: PHP
Posted by: Massimo Zappino
Added: Jan 24, 2011 12:50 PM
Views: 165
  1. function generateSessionId()
  2.     {
  3.         list($usec, $sec) = explode(' ', microtime());
  4.         mt_srand((float) $sec + ((float) $usec * 100000));
  5.         $hash = md5(uniqid(mt_rand(), true));
  6.  
  7.         return $hash;
  8.     }

1 comment

Lionel COTE 3 years ago
echo uniqid();

;-)

Write a comment