Well, I don't have the time to do the research for you, I'll say 'yes' - use an API to get this done, odds are good google offers it, and that'd be the first place I'd look.
If you decide to write it yourself, I can help you with that, but that really is a huge undertaking, I've written one before, you're looking at databases of zipcodes that have the latitude and longitude in them, then radius math based on this to find what it encompasses, that for areas larger than a few miles really should factor in curvature of the earth, and all in all ends you up with a huge amount of data that needs to be updated regularly.
(actually, to be honest it's not that huge of a task to write, only take a day or 2 for the core code, but keeping the data up to date is a pain)