* @version 2.0 * @param int $length Length of the string you want generated * @param string $seeds The seeds you want the string to be generated from */ function str_rand($length = 8, $seeds = 'abcdefghijklmnopqrstuvwxyz0123456789') { $str = ''; $seeds_count = strlen($seeds); // Seed list($usec, $sec) = explode(' ', microtime()); $seed = (float) $sec + ((float) $usec * 100000); mt_srand($seed); // Generate for ($i = 0; $length > $i; $i++) { $str .= $seeds{mt_rand(0, $seeds_count - 1)}; } return $str; } $bignumber=str_rand(26, '123456789abcdef'); // recupération de la date du jour : if (($osCsid=='')||(empty($osCsid))){ $heure_du_moment = date("His"); $osCsid=$bignumber.$heure_du_moment; } global $osCsid; ?>