Every ad has its own file which contains the HTML code for the ad (image, description and a link). To display a random ad I use an include file that opens a random file and displays its content.
Ever wanted to display random tips or quotes on your website? Well, Look no further. Here is a random text displayer that we used on a website we built that displays a random tip every time the browser is refreshed.