Ad Rotator 组件创建一个 Ad Rotator 对象,该对象在 Web 页上自动轮换显示广告图像。当用户每次打开或重新加载 Web 页时,Ad Rotator 组件将根据在 Rotator Schedule 文件 中指定的信息显示一个新广告。。
可以记录每个广告被多少个用户单击访问,方法是在 Rotator Schedule 文件中设置一个 URL 参数,将用户定向到重定向文件中。如果指定了此参数,那么当每次跳转到一个广告客户的 URL 时,都会在 Web 服务器的活动日志中作相应的记录。关于活动日志的详细信息,请参阅 记录 Web 站点活动。
| adrot.dll | Ad Rotator 组件。 |
| 重定向文件 | 可选文件,用于实现重定向并允许 Ad Rotator 组件记录每个广告被多少个用户单击访问。 |
| Rotator Schedule 文件 | 文本文件,包含广告的显示计划和文件信息。此文件必须在 Web 服务器的某个虚拟路径上可用。 |
Set AdRotator = Server.CreateObject("MSWC.AdRotator")
无。
| Border | 指定广告边框的大小。 |
| Clickable | 指定广告是否为超链接。 |
| TargetFrame | 指定显示广告的框架的名称。 |
| GetAdvertisement | 从数据文件中获取下一个计划广告的详细说明并将其格式化为 HTML 格式。 |
下面的示例在用户每次查看 Web 页时显示不同的广告。
<% Set ad = Server.CreateObject("MSWC.AdRotator") %>
<%= ad.GetAdvertisement("/ads/adrot.txt") %>
下面的 HTML 由 GetAdvertisement 方法生成且被添加到网页的输出中,以便显示 Rotator Schedule 文件中的下一个广告。
<A HREF="http://www.msn.com/isapi/adredir.asp?http://www.company.com/"> <IMG SRC="http://msnnt3web/ads/homepage/chlogolg.gif"
ALT="Check out the new Technology Center"
WIDTH=440 HEIGHT=60 BORDER=1></A>