Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/04/2009, 20:11
Avatar de dannce4life
dannce4life
 
Fecha de Ingreso: junio-2008
Ubicación: localhost
Mensajes: 137
Antigüedad: 15 años, 10 meses
Puntos: 6
Respuesta: generar nombre único (al estilo youtube).

Código php:
Ver original
  1. function rand_($l = 32){
  2.         $c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxwz0123456789";
  3.         for(;$l > 0;$l--) $s .= $c{rand(0,strlen($c))};
  4.         return str_shuffle($s);
  5.     }

el mas alto valor aleatorio posible
__________________
Gracias