Simple, Fast and Light-Weight Banner Advertisement Rotator using Server Side Includes (SSI)

Here’s a code snippet which will let you rotate multiple banner advertisements for all the ad spaces you have on your HTML pages. I wrote this because I didn’t want to use an ad server and wanted a light weight yet elegant solution. What the below code does is, it creates a SSI variable ‘slot’ which can have possible values of 1-12. Each value corresponds to a 5 second slot. Source this file at the start of your HTML file and then use the slot variable anywhere in your HTML code to rotate data according to time based slots. Continue reading