I think you can really only get the IP reported by the browser so that is
CGI.REMOTE_ADDR (unless they actually use latency tests to figure out
location which can be done but most APIs don't go there.)
At which point, all you are really doing is looking into a DB. But their
API has a built in map to all the country codes and names (which is in
their source so not hard to replicate either... it's all LGPL) But if you
decide to just use their DB, you should be able to add the jars to the
classpath and then the code should look something like...
lookupService = createObject("java", "com.maxmind.geoip.LookupService");
cl = lookupService.init("C:\geoservice.dat",1); // Note '1' is the value
for the GEOIP_MEMORY_CACHE constant... I would suggest replicating the
constants into your code
country = cl.getCountry(CGI.Remote_ADDR).getName());
Hope that helps,
Jason