php forum
php mysql forum
php mysql smarty
 
Topic Options
#210967 - 07/22/01 10:26 AM A little hack for random text
santana Offline
Member

Registered: 09/26/00
Posts: 229
Loc: Asia
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.<br /><br />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..."<br /><br />Put this code on your main.inc.php somewhere after:<br /><pre><br /><br />// --------------------------<br />// Give the start of the page <br /> $html = new html;<br /> $html -> send_header($tsubject,$Cat,0,$user['U_Username'],$user['U_Password'],0,$user);<br />....<br /><br />// Start random code<br /> $quote = file("http://yourdomain.com/quotes.txt"); <br /> srand((double)microtime()*1000000); <br /> echo $quote[rand(0,count($quote))]; <br /></pre><p><br /><br /><br />Create a file name called quotes.txt and insert your text there.<br /><br />The code will take randomly 1 row at a time from the quotes.txt<br /><br />Good luck.<br /><br /><br /><br /><br />http://forumponsel.com<br />Cell Forum<br />http://anteromas.com<br />Global Trade
_________________________
...... x ......
Using UBBt 6.4.2 + Digg Ajax Mod, Trust Ajax Mod, Captcha Regristation & Login mod, Checkusername Ajax mode.

Top


Who's Online
0 registered (), 24 Guests and 15 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Spell Check [beta]
by Bill B
Today at 09:16 PM
PhotoPost BB Code Popup
by AllenAyres
Today at 09:41 AM
Problems reading a lot of old posts here
by AllenAyres
Today at 09:35 AM
Forum 'Trader Ratings'.
by AllenAyres
Today at 09:33 AM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
New Mods
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Spell Check [beta]
by
10/17/06 09:24 PM
Newest Members
David DelMonte, nick1, Begbie, cenk, MATTO
13363 Registered Users
Top Posters
AllenAyres 25452
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks