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