1,md5的例子
<? $id = md5(uniqid(rand())); echo "$id"; ?>
2,使用md5函数加密文本
<?php $val = "secret"; echo "Pre-hash string: $val <br />"; $hash_val = md5 ($val); echo "Hashed outcome: $hash_val"; ?>
3,用uniqid函数生成id
<? $id = uniqid("phpuser"); echo "$id"; ?>