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