Login   Register  
PHP Classes
elePHPant
Icontem

File: sample_ads.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Vedanta Barooah  >  Ad Rotator  >  sample_ads.php  >  Download  
File: sample_ads.php
Role: Example script
Content type: text/plain
Description: Example (images with links)
Class: Ad Rotator
Random ad image list rotator
Author: By
Last change:
Date: 2005-08-22 03:07
Size: 473 bytes
 

Contents

Class file image Download
<?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");
echo 
"<hr>\n";
/* show horizontal ads */
print $o->showAds();
?>