I need to be able to turn IP4 addresses into country names. (It doesn't have to be 100% accurate). So the code would be something like:
Code:
if ( 62 == ip_address.first_octet )
return "Ireland";
else if ( 41 == ip_address.first_octet )
return "Nigeria";
else if ( 158 == ip_address.first_octet )
return "Chile";
else
return 0;
Does anyone have such code available? I'd really appreciate if you could post it here (it can be in any programming language at all).