Canada Post 'lookup postal code' screen scrape code
I don't want to reinvent the wheel.
Is an开发者_JAVA技巧yone aware of php/curl code to populate address data in Canada Post's 'Find a Postal Code' page http://www.canadapost.ca/cpotools/apps/fpc/personal/findByAdvanced?execution=e1s1 and return the valid postal code.
I thought it would make a great address verification routine.
Check out http://www.geocoder.ca too. They have a postal code lookup web service. They also have free postalcode/city data here:
http://geocoder.ca/?freedata=1
Why don't you just use the API for the webservice they provide?
Then you don't have to scrape a screen...
精彩评论