三、打开global.func.php
查找
[Copy to clipboard]CODE:
function random($length, $numeric = 0) {
mt_srand((double)microtime() * 1000000);
if($numeric) {
$hash = sprintf('%0'.$length.'d', mt_rand(0, pow(10, $length) - 1));
} else {
$hash = '';
$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
$max = strlen($chars) - 1;
for($i = 0; $i < $length; $i++) {
$hash .= $chars[mt_rand(0, $max)];
}
}
return $hash;
}
替换为:
[Copy to clipboard]CODE:
function c2ch($num){
$ch_h = chr(substr($num,0,2)+160);
$ch_l = chr(substr($num,2,2)+160);
return $ch_h.$ch_l;
}
function num_rand(){
mt_srand((double)microtime() * 1000000);
$d= mt_rand(16,36);
$n= mt_rand(1,19);
return c2ch($d*100+$n);
}
function random($length, $numeric = 0) {
mt_srand((double)microtime() * 1000000);
if($numeric) {
for($i=0;$i<$length;$i++)
{
$hash[1][$i]=num_rand();
$hash[2] .= $hash[1][$i];
}
} else {
$hash = '';
$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
$max = strlen($chars) - 1;
for($i = 0; $i < $length; $i++) {
$hash .= $chars[mt_rand(0, $max)];
}
}
return $hash;
}
这一步不行呢?
我搜索
function random($length, $numeric = 0) {
mt_srand((double)microtime() * 1000000);
if($numeric) {
$hash = sprintf('%0'.$length.'d', mt_rand(0, pow(10, $length) - 1));
} else {
$hash = '';
$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
$max = strlen($chars) - 1;
for($i = 0; $i < $length; $i++) {
$hash .= $chars[mt_rand(0, $max)];
}
}
return $hash;
}
这些.一点都搜不出来呢? |