<?php $str="0123456789abcdefghijklmnopqrstuvwxyz"; $tmp=$str[mt_rand(0,35)].$str[mt_rand(0,35)].$str[mt_rand(0,35)].$str[mt_rand(0,35)].$str[mt_rand(0,35)]; echo $tmp;?>
来源: http://www.phpxs.com/code/1003404/