<%@ LANGUAGE = PerlScript%> Create a MSWC.AdRotator server Component
ActiveState PerlScript

Create a MSWC.AdRotator server Component that can be used to automate rotation of advertisements on a Web page.

<% $Ad = $Server->CreateObject('MSWC.Adrotator'); %> <%= $Ad->GetAdvertisement("./adrot.txt") %>
<% $url = $Request->ServerVariables('PATH_INFO')->item; $_ = $Request->ServerVariables('PATH_TRANSLATED')->item; s/[\/\\](\w*\.asp\Z)//m; $params = 'filename='."$1".'&URL='."$url"; $params =~ s#([^a-zA-Z0-9&_.:%/-\\]{1})#uc '%' . unpack('H2', $1)#eg; %> Return

view the source