function 3rd_session($len) {

$fp = @fopen('/dev/urandom','rb');

$result = '';

if ($fp !== FALSE) {

$result .= @fread($fp, $len);

@fclose($fp);

} else {

trigger_error('Can not open /dev/urandom.');

}

// convert from binary to string

$result = base64_encode($result);

// remove none url chars

$result = strtr($result, '+/', '-_');

return substr($result, 0, $len);

}

相关文章:

  • 2021-12-29
  • 2021-11-17
  • 2021-10-27
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2021-12-15
猜你喜欢
  • 2021-08-17
  • 2021-12-13
  • 2021-07-08
  • 2022-02-01
  • 2021-07-09
  • 2022-01-26
  • 2021-08-25
相关资源
相似解决方案