PDA

View Full Version : Random header


Kuimera
10-26-2005, 07:25 PM
Hello guys,

Can some one tell me how or make me a script to change my header randomly in every page load.

I think that this ill not be very hard to do..

Hope you can get me this :)

Thanks in advanced.

Kuimera
10-28-2005, 12:11 PM
Any one ? :)

Dan
10-28-2005, 12:30 PM
$data[] = "banner1";
$data[] = "banner2";
$data[] = "banner3";
$data[] = "banner4";
$banner = array_rand($data);
// print out whatever with $banner in it


In 3.0.7 that would go into phpstart_include I think and global_start in 3.5 but not sure.


<?php echo $data["$banner"]; ?>


And that should echo out the url to the banner you want.

Tada!

TygerTyger
10-28-2005, 12:40 PM
There are several scripts to do this already, search the forum.

yao
12-18-2005, 12:18 PM
test?