I would like a simple rotating script. This will probably be the worlds simplest website yet I'm not sure how to go about it. This is what I envision: Blank white site with a simple script that shows a different 125x125 image above the fold every 2 seconds, and I can hyper link to each image. So you would go to mydomain.com and the script would start, image 1 and link to x.com , 2 seconds, image 2 plus link to y.com pops up and replaces image 1, image 3 pops up....etc. Can someone tell me what code I Need to generate the image and hyperlink every 2 seconds?
Yes, pretty easy. Follow these steps :- 1) Create a file "rotator.php" with the following code :- <?php $fcontents = join ('', file ('rotate.txt')); $s_con = split("~",$fcontents); $banner_no = rand(0,(count($s_con)-1)); echo $s_con[$banner_no]; ?> 2) Create a txt file "rotate.txt" with the following code :- banner1 ~ banner2 ~ banner3 ~ banner4 and so on... Replace banner1, banner2, banner3, banner4 with your desired code. 3) Open the php file where you need to rotate your banner and insert the following code exactly where you need it :- include 'rotator.php' Credit goes to original script writer... And you're done. Hope it helps
If anyone can help, look at the site, I did exactly what you said, but it didnt work http://www.healeynetworks.com