function jiami($str){
$tt = "";//替换后的信息
$ss = "";//替换回来的信息
$img = $str;
$str = "QAZPLWSXEDCRFVTGBYHNUJMIKO";
//echo utf8_strlen($img)."字符长度
";
for($i=0;$i
$tt .= substr($str, mt_rand(0, strlen($str) - 1), 1);
}
$ss = $tt;
$tt = str_replace("Q","∵",$tt);
$tt = str_replace("A","∴",$tt);
$tt = str_replace("Z","┐",$tt);
$tt = str_replace("W","└",$tt);
$tt = str_replace("S","┘",$tt);
$tt = str_replace("X","├",$tt);
$tt = str_replace("E","┤",$tt);
$tt = str_replace("D","┬",$tt);
$tt = str_replace("C","┴",$tt);
$tt = str_replace("R","┼",$tt);
$tt = str_replace("F","「",$tt);
$tt = str_replace("V","」",$tt);
$tt = str_replace("T","≮",$tt);
$tt = str_replace("G","≯",$tt);
$tt = str_replace("B","∈",$tt);
$tt = str_replace("Y","∪",$tt);
$tt = str_replace("H","∧",$tt);
$tt = str_replace("N","∨",$tt);
$tt = str_replace("U","∠",$tt);
$tt = str_replace("J","×",$tt);
$tt = str_replace("M","÷",$tt);
$tt = str_replace("I","+",$tt);
$tt = str_replace("K","±",$tt);
$tt = str_replace("O","☇",$tt);
$tt = str_replace("L","☈",$tt);
$tt = str_replace("P","☄",$tt);
$z = array("miwen"=>$tt,"zimu"=>$ss,"yuanwen"=>$img);
return $z;
}
function utf8_strlen($string = null) {
// 将字符串分解为单元
preg_match_all("/./us", $string, $match);
// 返回单元个数
return count($match[0]);
}
?>
返回数组 miwen zimu yuanwen 三个元素