How to implement Geolocation / Geo-Targeted banner ad display on my web site?

I'm looking for a solution either in perl or php to dynamically display geo-targeted ads based on user's IP.  I don't need a complete banner system, but ways for me to make customized implementation.

Is there any cost involved to determine user's location based on IP?

eg.

If user is located in Japan, I'll display local Japanese ads.

If in China and Hong Kong, I'll will display local Chinese ads.

Users from the rest of the world, I'll display English ads targeted globally.

I don't want to determine based on browser's language detection, but based on user's physically location and IP address.
jay28leeAsked:
Who is Participating?
 
Dave BaldwinFixer of ProblemsCommented:
Maxmind has some free version of their GeoIP code available.  http://www.maxmind.com/app/geolitecountry  Get the API and code that you can use.
0
 
TintinCommented:
Do you want to have control over the actual ads or not?

If not, then have you considered Google Adsense?
0
 
jay28leeAuthor Commented:
yes, i want to have full control of the ads on what exactly is being displayed.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.