Ad banner ads are the most common form of advertising on the web. This article introduces a banner ad management system based on IIS and ASP, the system supports the management of advertisers and advertising, can randomly select ads and generate HTML code to display ads (but the level of reference ads, the number of display restrictions, clicks limit), and can record the advertising display, click the historical record.
I. DATABASE table structure
The title ad, banner ad, is the most common form of advertising on the web. The title AD management system introduced in this article uses Access database Db.mdb to save data. Db.mdb contains three tables: advertisement holds information about the advertisement, Advertiser saves The Advertiser information, Bannerhistory saves the history of the advertisement display and clicks. The three tables are structured as follows:
Table field type description
Advertisment (AD) Advertiserid the number of the digital advertiser.
The Status number indicates whether the advertisement is allowed to display. 0 indicates no display, 1 indicates display. When the number of ad displays (or clicks) exceeds the display limit (or the number of hits), the system sets the value to 0. can also be in the advertising management function manually prohibit advertising display. (within the management module, 1 is displayed as "available," and 0 is displayed as "unavailable.") )
ImageURL the URL of the text ad picture, which is the location of the picture.
ImageWidth the width of the digital advertising picture.
ImageHeight the height of the digital advertising picture.
Link text Advertisers are required by the advertising links.
Text for alttext text ad pictures. (Alt attribute for tag)
Weight Digital display level. The level value affects how frequently the advertisement appears. This article implements predefined 10 levels (1-10). The higher the level value the greater the chance that the advertisement will appear.
StartDate Date Time Start date
EndDate Date Time End date. In this implementation, these two date values do not affect the display of ads, as long as the number of displayed and the number of clicks did not exceed the limit, the ads can always be displayed.
Viewlimit number Display number limit. The status changes to 0 when the ad is displayed more than this value.
Clickslimit number of clicks limit. The status will change to 0 when the number of ad clicks exceeds this value.
Adid Digital advertising number, automatically generated by the system, is the only identification of advertising. Adid is the primary key for this table.
Impressions number of times this advertisement has been shown.
Clickthroughs number of times this ad was clicked.
Advertiser (ad customer) name text customer Name
Address text addresses
CityStateZip text city and zip code
Phone text telephone
Fax text Faxes
URL Text Client Site
Login text The logon name used by the customer to query their advertising display and clicks via the Web.
Password the password used by the text client to log on.
Email text message.
Advertiserid Digital AD customer number, automatically generated by the system, is the unique identity of advertisers. Advertiserid is the primary key for this table.
Bannerhistory (show or click Historical record) Advertiserid Digital advertiser number.
Adid Digital ad number.
IPAddress text to browse or click on the advertiser's IP address.
The type number type indicates whether this record is a display advertisement or an ad click. 1 indicates that 2 indicates a click.
DateTime date time displayed or clicked on the ad.
In this implementation, all processing logic is implemented by an ASP script, which is used only to save data, in order to facilitate porting the system from an Access database to another database. In practical applications, we recommend that partial processing logic be implemented in the database, such as comparing existing displays and display limit values to determine whether the advertisement display is prohibited (which, of course, is supported by the database system in use).
From the functional point of view, the system provided by this article can be divided into two parts: the Management section and the advertising display part. The management section is used to add, delete, and modify information about ads and advertisers, such as prohibiting or enabling an ad. The Display section is responsible for generating HTML code that displays the banner ads. The implementation of this article does not provide a statistical chart of the number of displays and clicks, but the data is stored in the Bannerhistory table, which makes it easy to get a variety of statistical data. For graphical production of ASP applications, see "Using ASP and HTML to make bar statistics charts."