Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a random ad system

Status
Not open for further replies.

hallm

Programmer
Jun 11, 2000
159
0
0
US
I'm trying to replace a combination javascript & Perl ad system that I'm using now for my website.&nbsp;&nbsp;I need to create something that will search through a table of active ads to display only one of each ad in several locations on one page.&nbsp;&nbsp;To explain we have about 20 advertisers that share space but only space for about 10 ads.&nbsp;&nbsp;The webpage is at <A HREF=" TARGET="_new"> if you need to see the example. (look at the ads on the right of the screen).&nbsp;&nbsp;How can I have the ASP randomly go through a list of advertisers picking them to display but being sure that they only display one time.&nbsp;&nbsp;I'm setting up the database with an ad id, ad name, link location, image location, and active.
 
hi hallm,<br><br>IIS comes with a build in component for that. Use the following code:<br><br><font color=#00ff00>&lt;%<br>Dim adrot<br>Set adrot= Server.CreateObject(&quot;MSWC.AdRotator&quot;)<br>adrot.Border=0<br>adrot.Clickable=True<br>adrot.TargetFrame=&quot;_new&quot;<br>Response.Write (adrot.getAdvertisement(&quot;adrotfile.txt&quot;))<br>%&gt;</font><br><br>For information about how to build up the adrotfile.txt and the redirection page go to <A HREF=" TARGET="_new">
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top