I figured you could insert some Javascript of your own into the code Google gives you to randomly display different ads instead of the same one all the time but apparently messing with the code they give you is against Adsense terms of use. But is it ok to randomly switch out the code block itself? What if you used another language like PHP to display at random times one code block and then another? You wouldn't be changing the code Google gives you at all.
You can rotate ads. Shouldn't be a problem. I used to have a site where sometimes I rotated a 728X90 and 468X60 ads. I used this ad rotator (you can add as many ads as you want: $bannerAd[3] $bannerAd[4], etc.): <?php $bannerAd[1] = 'code for ad 1'; $bannerAd[2] = 'code for ad 2'; $adCount = count($bannerAd); $randomAdNumber = mt_rand(1, $adCount); echo $bannerAd[$randomAdNumber]; ?>
Hi, your code can be simplified to: <?php $bannerAd[] = 'code for ad 1'; $bannerAd[] = 'code for ad 2'; shuffle($bannerAd); echo $bannerAd[0]; ?> Yes shuffle() randomizes the array.