One solution might be to use the free MaxMind GeoLite Country database locally on your server and run the IP queries against that instead of Arin.net
They also have the free GeoLite City with more resolution, plus a remotely hosted Javascript version you could connect to:
Both have 99.5% accuracy on a Country level, and GeoLite City has 79% on a city level. So there may be something there you can work with.