Shakuni -
If you are using perl you might want to look at GeoIP (
http://www.maxmind.com/app/perl). It will give you the location by country, state and even city. If you don't use perl I noticed they have versions for C, C#, JAVA, Pascal, PHP, Python and Ruby.
Hope that helps.
Good Luck!
Funkybunch