View Single Post
Old 11-19-2008, 12:54 PM  
Spudman
Confirmed User
 
Spudman's Avatar
 
Join Date: Aug 2002
Location: UK
Posts: 3,198
Quote:
Originally Posted by Rorschach View Post
Put your iframe code in various text files, eg. 1.html -> 6.html. Include the entire iframe code from opening iframe tag to the closing tag.

Put this code where you want to place your rotating iframe:

<?php

$max = 6;

$i = mt_rand(1, $max);

include("$i.html");

?>

You can change the value of $max depending on how many iframe text files you have.
does this work in a .shtml page? can't get it to work.
__________________
Take it Easy !!!
Spudman is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote