UBB.Dev
Posted By: santana A little hack for random text - 07/22/2001 5:26 PM
This might be useful for those who want to encourage visitors using markup on their message, random message, or anything that you want to doit randomly.

I use this little code to display "FAQ", "the benefit for being registered", "How to display links, bold, italic, smile, etc...", "Did you know thing..."

Put this code on your main.inc.php somewhere after:


// --------------------------
// Give the start of the page
$html = new html;
$html -> send_header($tsubject,$Cat,0,$user['U_Username'],$user['U_Password'],0,$user);
....

// Start random code
$quote = file("http://yourdomain.com/quotes.txt");
srand((double)microtime()*1000000);
echo $quote[rand(0,count($quote))];




Create a file name called quotes.txt and insert your text there.

The code will take randomly 1 row at a time from the quotes.txt

Good luck.




http://forumponsel.com
Cell Forum
http://anteromas.com
Global Trade

© UBB.Developers