Lida 2691 vezes
funciona com imagens, mas não funciona com o formato dos anuncios do Google : S
<?$imgamaleatoria=rand(1,5);?>
<?php include(TEMPLATEPATH.”/ficheiro<php? echo $imgamaleatoria ?>.php”);?>
<?php $ad1 = 'banner1'; $ad2 = '<a href="http://rumblepack.com.pt/retrogaming/"><img src="http://retrograming.files.wordpress.com/2010/04/retrogaming.png" alt="Retrogaming" title="Retrogaming"></a>'; $ad3='<a href="http://anthony.com.pt/"><img src="http://www.jogosbaratos.net/publicidade/banner-468x60.gif" alt="Anthony Vendeirinho" title="Anthony Vendeirinho"></a>'; $ad4='<iframe allowtransparency="true" src="http://ads.betfair.com/ad.aspx?bid=4175&pid=63253" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>'; $num = rand (1,4); $ads = ${'ad'.$num}; echo $ads; ?>
faz algo tipo isto:Código: [Seleccione]<?php $ad1 = 'banner1'; $ad2 = '<a href="http://rumblepack.com.pt/retrogaming/"><img src="http://retrograming.files.wordpress.com/2010/04/retrogaming.png" alt="Retrogaming" title="Retrogaming"></a>'; $ad3='<a href="http://anthony.com.pt/"><img src="http://www.jogosbaratos.net/publicidade/banner-468x60.gif" alt="Anthony Vendeirinho" title="Anthony Vendeirinho"></a>'; $ad4='<iframe allowtransparency="true" src="http://ads.betfair.com/ad.aspx?bid=4175&pid=63253" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"></iframe>'; $num = rand (1,4); $ads = ${'ad'.$num}; echo $ads; ?>funciona também com o google que eu ja testei (esta solução é mais ou menos aquilo que o betanalista sugeriu)
AdSense
SMF
Desenvolvimento