Categories

Updated: 12/21/2004

Ad Rotator

This is a simple class that can be used to create ads that rotate according to a random order. The class takes an array of image files name strings as parameter but it could also be HTML tags for rich media ads. Then it shuffles the numbers assigned to each ad array position in a way that the shuffled array does not contain repeated ad numbers. It displays randomized images from a group of specified images, without repetition. Finally the class can return a new array of ads sorted by order determined by the shuffled ad numbers array. The returned array can be used to display one or more ads in the same page.
©2019 A--9.com