Here is how I do it.
Create a page called random.php. Add the following code to it.
Change Ifame Code 1 and Iframe Code 2 to the iframe code for the mod that you want to display. You can also enter any other code such as adsense ads. You can add additional lines by adding $aHTML[3] = 'Iframe CODE 1';. See that I changed the number in the [] to 3. Just keep incrementing that number for each new line.Code:<? // Random HTML Generator // HTML Array.... $aHTML[0] = 'Iframe CODE 1'; $aHTML[1] = 'Iframe CODE 2'; // Calculate index $iUpper = sizeof($aHTML) - 1; $iLower = 0; $iIndex = rand($iLower, $iUpper); // Display HTML echo $aHTML[$iIndex]; ?>
Now that you have the random.php file working. You can use an iframe to add it to your page. It works really well.
Hope that helps, Jereme




Reply With Quote
Bookmarks