Code:
Like I want to click on an IP address it will tell me which zip code is this IP from and pin point it on a map
I think you're barking up an unlikely tree (pardon the shabby metaphor).
To my knowledge, all "geo-" information about IPs is based upon the ARIN/RIPE assignments to ISPs and companies. Those registrations are often in huge IP range blocks and the registration "geography" is assigned to a mailing address for that company - which may or may not be proximate to the physical geography served by that IP range.
Let's consider an example:
Say that AT&T has been assigned the (fictional) IP range of 300.200.100.0 as a class C address. Let's say that AT&T deploys that IP range to service a pool of DSL customers in the greater Chicago area. Let's also assume that the ARIN registration has the assignment to AT&T registered at an office in Boca Raton, FL.
You can test your results from sites like
Consider another case... AT&T again is assigned an IP block and their office is within the service area of that IP block. However, their service covers several metro ZIP codes that are proximate to that service office. Again you don't get accurate information.
PLUS - netblocks are always in flux as assignments are moved, deleted, consolidated, added, etc. While you might be able to buy a database today of IP-zip, prepare yourself for maintenance.
If you have specific questions about a particular IP you can try out another service I just googled up
Maybe someone else has a solution, but my understanding is that databases like hostip.info are of questionable long-term reliability/integrity.
D.E.R. Management - IT Project Management Consulting