Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/04/2010, 19:38
thezzin
 
Fecha de Ingreso: septiembre-2008
Mensajes: 350
Antigüedad: 15 años, 7 meses
Puntos: 31
Respuesta: Cómo crear mensajes con textos aleatorios

Con este código php puedes mostrar una frase aleatoria

Código PHP:
<?php 
$FileRand_Txt 
file("rand.txt");
$linea $FileRand_Txt[array_rand($FileRand_Txt)];
echo 
$linea;
?>
lo que hace es leer solo una linea de texto a la ves del file rand.txt
suponiendo que tienes esto:

Código:
Foros Del Web
Apache The Number One HTTP Server On The Internet
Google
Yahoo!
php Pre-procesador de Hipertexto
Univision
en el file, rand.txt solo mostrara una sola linea

-
__________________
╬-----╬
║☺₧☻║
╬-----╬