![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
18/08/2008, 13:44
|
![Avatar de Ronruby](http://static.forosdelweb.com/customavatars/avatar249338_1.gif) | | | Fecha de Ingreso: julio-2008 Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 16 años, 6 meses Puntos: 416 | |
Respuesta: Generar un nombre al azar Código PHP: <?php function r_string($len) { list($usec, $sec) = explode(' ', microtime()); $seed = (float) $sec + ((float) $usec * 100000); srand($seed); $newstring = md5(rand()); if ($len) { return substr($newstring,0,$len); } else { return $newstring; } } ?> Fuente: http://www.roscripts.com/Generate_random_string-83.html |