Ways of finding Location from IP Address
RFCs 1712 and 1876 describe different ways of adding a DNS resource record for location.
All you need to do is add it to you DNS ZONE file. e.g yahoo is
yahoo.com LOC 37 23 30.900 N 121 59 19.000 W 7.00m 100.00m 100.00m 2.00m
Which translates to ...
The program query-loc does this.