News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Jason Palmer's Blog:
Zip Code To Location
December 28, 2006 @ 11:22:00

On his blog today, Jason Palmer has a handy bit of code to help you validate zip codes on your website (using the Codebump.com web service).

Using the CodeBump GeoPlaces Web Service I constructed a function which takes three parameters (zip, city, state) and does a case-insensitive comparison to make sure that the given zip code matches the city and state. Upon verification the function will return true. Otherwise, it returns false.

The simple code is about 35 lines long and grabs and parses out the information with a combination of an fopen and converting the results into an XML element.

0 comments voice your opinion now!
zipcode location example codebump zipcode location example codebump


blog comments powered by Disqus

Similar Posts

Imagine Easy: Pushing the limits of metaprogramming in PHP: aspect oriented design

Felix Geisendorfer's Blog: How to organize your CakePHP App's Javascript?

Ian Selby's Blog: Put Your PHP App on Steroids - Optimizing with APC Cache

Ligaya Turmelle's Blog: Streams Gem

Richard Thomas' Blog: Pjq becomes jQPie - jQuery PHP interface extension


Community Events











Don't see your event here?
Let us know!


composer package hhvm introduction overview threedevsandamaybe hack framework code component install language security application unittest symfony2 podcast release facebook opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework