Not sure if anyone will find this useful or not...but I use it in a block to display a random image that links to an affillate site that sells PC hardware. I suppose it could be used for any number of things...not sure where I found it, one of the many php script sites?
I created a folder in the root & added my .inc files there.
*Note* Put your html code into a text editor [NotePad] & save as a .inc file.
Create a new custom block & put the code below [update w/your file_name.inc] in & set as php script.
#########################################################
## Put the number of random items to be displayed in place of 5
$items = 5;
$randnum = rand(1,$items);
## This is the path to the files you will be using, leave
## off the trailing slash '/'
$your_path = "/your/path/to/the/items";
## This is the .inc file that will show html in the custom block.
## Only change this part--> _file_name_
## For each item, you add another line, and add 1 to the [#]
$inc[1] = "$your_path/_file_name_.inc";
$inc[2] = "$your_path/_file_name_.inc";
$inc[3] = "$your_path/_file_name_.inc";
$inc[4] = "$your_path/_file_name_.inc";
$inc[5] = "$your_path/_file_name_.inc";
# This places the random html file into the custom block.
include $inc[$randnum];
#########################################################
Good Luck & Enjoy!