View Single Post
Old 02-12-2005, 03:27 AM  
Dynamix
G F Y not
 
Industry Role:
Join Date: Jan 2004
Location: MN
Posts: 2,910
To display a random thumb and/or link in your page:

On your page somewhere write:

Code:
<?PHP require("random.php"); ?>
Then put the following code into a file named random.php:

Code:
<?PHP
	$total = 2;
	$site["1"] = "http://www.ha4l.com/";
	$site["2"] = "http://www.eg4l.com/";

	$thumb["1"] = "images/thumb1.gif";
	$thumb["2"] = "images/thumb2.gif";


	srand(time());
	$x = (rand()%$total);

	echo('<A HREF="' . $site[$x] . '"><IMG SRC="' . $thumb[$x] . '" BORDER=0></A>');
?>
__________________

TGPFactory Full TGP Design & Installation Services
ICQ 250 142 484 · AIM TGPDynamix · Email: patrick (at) tgpfactory (dot) com
See who I am at AdultWhosWho.com!
Dynamix is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote