It came to my attention over the weekend that the page referred to in this previous post is no longer available. So I’ll just post the script here.
|
1 2 3 4 5 6 |
< ? srand((double)microtime()*1000000); $arry_txt = preg_split("/--NEXT--/", join('', file("featured_flower.txt"))); echo $arry_txt[rand(0, sizeof($arry_txt) -1)]; ?> |
Put this wherever you want the rotation to play, and link to a text file with your quotes, links to images on your server, etc. (mine is linking to a quote file ‘featured_flower.txt’ that also includes images). You can see a bit of the text file here.
I hope this makes sense. It’s a great little script and you can style it by putting it in a CSS div.
« .htaccess Files – on old host or new host? System font (?) disappearance »

thanks for this! is there a way to make it completely random?
I don’t know for sure – I’m not a PHP person. But I did find this link that might help you:
http://www.daniweb.com/forums/thread22830.html