Better than my hazy recollections below, check:
GIS, CAD, GPS, mobile industry maps,news,jobs,data free software
Let me prime the pump with a couple of general thoughts
The key to Geo Targeting from IP address is the host lookup database, there is no systematic registry like Zip codes, these datbases are hodge podge affairs with inaccurate or completely missing info for some IPs.
The easiest thing for moderate traffic levels is to subscribe to a service that looks up the IP for you.
Check out
Geolocation and Online Fraud Prevention from MaxMind
I once subscribed to their IP to Geo info service, ast the time it was $20 for 50,000 lookups. This is useful for catching off shore web/email scammers posing as neighbors. They also offer credit card fraud detection services.
Here's the Lon-Lat their demo reports for wickedfire's ISP 34.0416 -118.2988
(25 free demos allowed a day)
Zip code to geo position is done from a database published by the US Postal service, this is resold by various servies, some offering quarterly updates, the cheapest ones are a one time sale that may be slightly dated or of a lower resolution 5 digit instead of 8 digit numbers. I bought one once for $10.
I think you can find scripts to access googlemap's address to geo location database, the free limit is quite a few thousand looks a day.