Print Page | Close Window

How ads should be managed

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2804
Printed Date: 30 March 2026 at 12:49am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: How ads should be managed
Posted By: PrivateEye
Subject: How ads should be managed
Date Posted: 17 May 2003 at 5:53pm
I am running an educational website using ASP and Access 2000. Students are registered from different cities. I want to develop an advertisement logic for displaying ads. I got ads from many institutes. I want these ads to be displayed according to the user's city. City name is already saved in the database while user registration. Can any one tell me the procedure that how can I manage all this. What about adrotator component?? Thank you.

-------------
The Judgement Day



Replies:
Posted By: Bluefrog
Date Posted: 17 May 2003 at 10:27pm

The problem sound simple, but it is actually very complex. You need a DB of all ISPs and their respective IP ranges. When a user then comes to your site, you need to check their IP, reference it against the DB, then serve up the right ad. An ad rotator won't help you there because they don't look up exactly who is coming - they only serve ads.

There are a couple components that can do what you need. Check out the people who make Browser Hawk; they also have a component called Country Hawk. See http://www.cyscape.com/products/country/intro.asp - http://www.cyscape.com/products/country/intro.asp  for more details.

I'm not sure if they can identify exact cities, but I know that the core database they use is available from the *NIC companies, e.g. ARPNIC, http://www.icann.org/ - ICANN , RIPE, etc. Most likely, they don't support cities. I know it is possible to find out individual states in the USA, because that is already built into the ICANN information. The same is not true for ARPNIC and some others.

Now, the problem comes to component vs. custom development on your own... Since no component will identify cities, you have to do it yourself. If you have a relatively small geographical area that you are serving content to, then it MAY be possible. However, you'd have to check with every ISP within the area to see what IP ranges they use for different cities, that is if they are large enough to cover more than one city, which most are. So, at this point, you need:

  • All the information from ICANN - RIPE, ARPNIC and the others are optional if you are only interested in the USA - Since you are in the UK, you need RIPE instead...
  • Geographical information for each ISP within the RIPE DB
  • Information from each ISP regarding how they use their assigned IP ranges.

However, if they just assign IP ranges over cities at random, then you're SOL.

The short answer - forget it. It is way too much work to be practical for you. This type of work is best left to professional web component development companies who can afford the $50,000 (to start) development costs for it because they'll sell it to a lot of different people. Realistically, I'd guess that developing this sort of technology would cost far above $50,000, simply because of the immense cost of discovering how IP ranges are assigned for each ISP. Maintaining it would be an even bigger nightmare. Developing the engine to quickly search a huge database of cities would be costly enough. Companies like Inktomi and Google have huge businesses set up around search technologies which bear a very similar resemblace to this problem.

 

Cheers

 



Posted By: Bluefrog
Date Posted: 17 May 2003 at 10:34pm

Ooops, I think I'm going blind.... if they are all registered and you already know, then solving it is simple:

Set up ad rotators for each city and then serve that ad rotator. e.g. A SELECT CASE CITY structure would do that for you.

SELECT CASE City

case "London"

' code for ad rotator for london

case "york"

' code for york ads

case "myHomeTown"

' more code

case else

' some default ads

END SELECT

The standard IIS content rotator component should be good enough.

e.g.

<%
SET objAd=Server.CreateObject("MSWC.ContentRotator")
AdPath="Ads/Ad.txt"
Ad=objAd.ChooseContent(AdPath)
Response.Write Ad
SET objAd=Nothing
%>

and then in the Ads directory you have a file called Ad.txt. That file looks like this:

%% 1

HTML CODE HERE

%% 1

MORE CODE HERE

There's another ad rotator. Check the IIS documentation for it.

Cheers

 

 



Posted By: PrivateEye
Date Posted: 18 May 2003 at 5:05pm

Thanks BlueFrog,

Though your second answer is what I was looking for but the first one is alo informative for me. Many thanks to you :)

Shouldn't I use AdRotator Component rather than ContentRotator as you mentioned??



-------------
The Judgement Day


Posted By: Bluefrog
Date Posted: 19 May 2003 at 5:32am
Yes - perfectly correct... I just was too lazy to sort around and post it.  Google works better anyways  ~!



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net