Anytime
random image display
Started by CyCloneKC, Oct 13 2003 02:31 PM
5 replies to this topic
#1
Posted 13 October 2003 - 02:31 PM
#2
Posted 13 October 2003 - 01:40 AM
I was wondering how to make a single random image be displayed out of multiple choices (see "Ads" (above news) on Origin home page)
#3
Posted 13 October 2003 - 02:06 AM
Its not that hard.
<?
$URL1="http://URL1";
$URL2="http://URL2";
$URL3="http://URL3";
srand((double) microtime() * 1000000);
$random = rand(1,3);
if($random == 1)
@header ("Location: $URL1");
elseif ($random == 2)
@header ("Location: $URL2");
elseif ($random == 3)
@header ("Location: $URL3");
?>
Course, you can add more... but this mainly deals with premade stuff, I wouldnt know how to make random stuff inside of a random choice thing. I imagine it wouldnt be hard, but it would be somewhat time consuming.
<?
$URL1="http://URL1";
$URL2="http://URL2";
$URL3="http://URL3";
srand((double) microtime() * 1000000);
$random = rand(1,3);
if($random == 1)
@header ("Location: $URL1");
elseif ($random == 2)
@header ("Location: $URL2");
elseif ($random == 3)
@header ("Location: $URL3");
?>
Course, you can add more... but this mainly deals with premade stuff, I wouldnt know how to make random stuff inside of a random choice thing. I imagine it wouldnt be hard, but it would be somewhat time consuming.
#4
Posted 13 October 2003 - 12:30 PM
Thanks, CyCloneKC!
#5
Posted 14 October 2003 - 02:51 AM
ooo, this could prove very useful, so I must thank you as well
Thanks,
The_kid
Thanks,
The_kid
#6
Posted 14 October 2003 - 03:23 PM
Hmmm, maybe I can find a use for this as well.
Too cute! | Server Status: If you can read this, it's up |Well, when it comes to writing an expository essay about counter-insurgent tactics, I'm of the old school. First you tell them how you're going to kill them. Then you kill them. Then you tell them how you just killed them.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users