Ad Rotator组件使用例子 |
Tha Ad Rotator component enables you to show banner advertisements with different frequencies. This component has one method, GetAdvertisement(), which displays a banner advertisement on a page. Before you can use the Ad Rotator component, you need to create two special files: the Rotator Schedule File and the Redirection File. The Rotator Schedule File lists information about all the banner advertisements that should be shown. The Redirection File is used to record how frequently each advertisement is clicked. The three files below demonstrate how to use the Ad Rotator Component. Click View Demo to see a "live" demonstration of this component. Listing 1.0 - adrot.asp ------------------------------- <% Set myAd = Server.CreateObject( "MSWC.AdRotator" ) %>
This is the adredir.asp fileNormally, you would use this file to redirect a user to the advertiser's home page. You can retrieve info about which ad the user clicked by examining the following query string variables: URL: <%=Request( "url" )%> IMAGE: <%=Request( "image" )%> |