Location: PHPKode > scripts > Ad Rotator class > ad-rotator-class/sample_target.php
<?php
# include("adrotator.class.php");
$image_array=array("one.gif","two.gif","three.gif","four.gif","five.gif","six.gif","seven.gif");
$links_array=array("http://one.com","http://two.com","http://three.com","http://four.com","http://five.com","http://six.com","http://seven.com");
$o = new AdRotator($image_array,$links_array);
$o->rotate(5);
/* show vertical ads */
print $o->showAds("VERTICAL",NULL,"_blank");
echo "<hr>\n";
/* show horizontal ads */
print $o->showAds(NULL,NULL,"_parent");
?>
Return current item: Ad Rotator class