Forum Moderators: coopster

Message Too Old, No Replies

Getting started in Web services using PHP

         

t2nguyen

11:05 pm on Jan 21, 2006 (gmt 0)



I'm starting to get into web services and kinda of a newbie at this, could any of you tell me how I could go about using a web service to calculate the distance between two postal / zip codes?

I'm building a webpage that has a list of store addresses and what i'm trying to do is take an a zipcode/postal input from the web user and it will find the closest address.

Could someone help point me in the direction I need to do such implementation?

rainborick

10:41 pm on Jan 22, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



These days, the Post Office is providing some web services, but I never needed them badly enough to pay their fees. I had to install this "nearest location" service for a client and decided to rely on my usual method - brute force programming. I simply subtracted the user's Zip Code from the Zip Code of each local office, taking the absolute value of each result to assemble a sorted list, and finally showing the user the top 5 (ie. smallest) results.