View Single Post
  #20  
Old Jun 25, 2009, 09:11 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
This will not rotate them but display a random one on each page view:

PHP Code:
<?php $random_number rand(1,3); 
switch (
$random_number) {
case 
1$img "someimage1.gif"$link "http://advertiser1.com/"; break;
case 
2$img "someimage2.gif"$link "http://advertiser2.com/"; break;
case 
3$img "someimage3.gif"$link "http://advertiser3.com/"
?>

<a href="<?php echo $link?>"><img src="<?php echo $img?>" alt="" /></a>
If you want real rotation, specific view shares per advertiser and other settings look for an ad management script or plugin

Last edited by Flynn; Jun 25, 2009 at 09:15 PM.