To support a marketing project, I developed a screen scraping program which harvested names and addresses from a county public website and downloaded the information in a csv format. This file was then edited in Excel and mail merged to a Word document, saving hours of labor each week.
One challenge of the project was to cleanse the addresses to reduced the number of returns from the mailing due to invalid addresses. As part of the cleansing process, the address was run through a parser written in PHP. This code was found online and was a good starting spot. However, there were some problems with parsing streets, cities and states that had two words. Several modifications later, some of the problems were cleared up, but several adjustments are still pending.
I made the changes needed for the project, but time did not permit correcting all the issues.
The updates address parse routine can be located at http:github.com/cswaim. Let me hear how you are using this.