Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/08/2008, 13:44
Avatar de Ronruby
Ronruby
 
Fecha de Ingreso: julio-2008
Ubicación: 18°30'N, 69°59'W
Mensajes: 4.879
Antigüedad: 15 años, 9 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