您的位置:论坛首页 >> 软件论坛论坛  

Ad Rotator组件使用例子

楼主: 2008-5-12 15:51:59
游客
 编辑  删除  回复  收藏  留言  好友   置顶   取消精华

原文: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
-------------------------------

adrot.asp


<%
Set myAd = Server.CreateObject( "MSWC.AdRotator" )
%>
<%=myAd.GetAdvertisement( "adrot.txt" )%>


Click on the image above to visit our sponsor.



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

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
------------------------------------------

adredir.asp


This is the adredir.asp file


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:

URL: <%=Request( "url" )%>

IMAGE: <%=Request( "image" )%>




 

 1楼: 2008-5-12 15:51:59
游客
 删除  留言  好友

靠,还英文。
 


回复帖子 RE: Ad Rotator组件使用例子

 1、第1个回帖者得3分,第2个回帖者得2分,其余得1个积分!

 2、如是求助帖,前10位有效回帖用户每人再各加10分!

 3、如果乱回求助帖,让原帖作者很不满意,他有权收回积分,系统也同时对您惩罚,扣除10个积分

帐号:
用户名 密码 (不填为游客)  注册新用户
内容:


撤消 恢复 粗体 斜体 下划线 左对齐 居中 右对齐 超级链接 取消超级链接 插入网上图片,支持格式为:gif、jpg、png、bmp 使用帮助 上传图片
表情符号:


附加码:
(附加码: 10715 )