1. 首页
  2. 数据库
  3. 其它
  4. php生成短域名函数

php生成短域名函数

上传者: 2021-01-30 23:49:29上传 PDF文件 30.57KB 热度 14次
php生成短域名函数 public function createRandCode($string) { $code = ''; $hex_code = '1qaz2wsx3edc4rfv5t-gb6yhn7ujm8ik9ol0p_'; $now = microtime(true) * 10000; $strlen = strlen($hex_code); $hash_code = hash('sha256', $string); // 这里会为编码定义一个随机的长度,长度取决于step $step = rand(8, 16);
下载地址
用户评论