Ad Rotator Component Usage examples

Source: Internet
Author: User
Reprint: ASP Boutique House Qianfeng
from:http://asp.superexpert.com/code/code.asp?cid=88
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 can use the Ad Rotator component, you need to create two special the Files:the rotator
File and the redirection file. The Rotator Schedule File lists information about all the banner
Advertisements that should to be shown. The redirection File is used to record how-frequently each
Advertisement is clicked.

The three files below demonstrate the Ad rotator Component. Click View Demo to a "live"
Demonstration of this component.



Listing 1.0-adrot.asp
-------------------------------
<body>

<%
Set Myad = Server.CreateObject ("MSWC. AdRotator ")
%>
<center><%=myad.getadvertisement ("Adrot.txt")%></center>
<p>
Click on the image above to visit our sponsor.

</body>
---------------------------------------

Listing 2.0-adrot.txt
---------------------------------------
Redirect/adredir.asp
WIDTH 468
HEIGHT 60
BORDER 1
*
Kidsorg.gif
Http://www.kidsOrg.com
kidsorg
60
Volunteer.gif
Http://www.volunteer.com
Volunteer
40

------------------------------------------





Listing 3.0-adredir.asp
------------------------------------------
<body>

Normally, 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:

<p><b>URL:</b> <%=request ("URL")%>
<p><b>IMAGE:</b> <%=request ("IMAGE")%>

</body>



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.