![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
15/06/2002, 05:37
|
![Avatar de DarkZero](http://static.forosdelweb.com/customavatars/avatar21177_1.gif) | | | Fecha de Ingreso: junio-2002 Ubicación: Chile
Mensajes: 52
Antigüedad: 22 años, 8 meses Puntos: 0 | |
Re: generar passwords aleatorios este codigo te genera un password aleatorio con los simbolos que tu le des y la cantidad de letras y/o numeros que le asignes
<?
$x=0;
$cifrado="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi jklmnopqrstuvwxyz0123456789";
mt_srand((double)microtime() * 1000000);
for($cifm5d=strlen($cifrado);$x<14;$x++){
$hash.=$cifrado[mt_rand(0,$cifm5d)];
}
$x=0;
echo $hash
?>
Saluditos ![Decabeza](http://static.forosdelweb.com/fdwtheme/images/smilies/decabeza.png) Dark Zero |