Here's a more efficient method: use this guy's free class file. I've
used it for similar solutions, and it's pretty easy to hack to make it
fit into whatever architecture you need. The code is fairly
straightforward.

http://www.micahcarrick.com/04-19-2005/php-zip-code-range-and-distance-calculation.html

On Dec 8, 2007 9:38 AM, Jeff Wilhelm - NYPHP <[EMAIL PROTECTED]> wrote:
> If you're going to do that you should use Google's API, otherwise when they
> make a change to their HTML your code will fail.
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Anthony Papillion
> Sent: Saturday, December 08, 2007 2:37 AM
> To: NYPHP Talk
> Subject: Re: [nyphp-talk] distances between two zip codes
>
> I had to get something like this working a few weeks ago and ended up using
> Google Maps. It's not an elegant solution but it works and it's free. Go to
> Google Maps and do a search. Do something like 74354 to 70601. You will
> notices that on the left hand panel of the returned page will be something
> like Drive: 602 mi. Look at the HTML generated. You can parse that and get
> the distance. Pretty simple actually.
>
> Hope it helps,
> Anthony Papillion
> OpenEMR HQ, Inc
> www.openemrhq.com
> (918) 926-0139
>
>
> chad qian wrote:
> > Hi,
> > I want to program php to calculate the distance between two zip
> > codes.I only have zip codes,nothing else.How to do it?I'm completely lost.
> >
> > Thanks!
> >
> > chad
> >
> > ----------------------------------------------------------------------
> > -- Share life as it happens with the new Windows Live. Share now!
> > <http://www.windowslive.com/share.html?ocid=TXT_TAGLM_Wave2_sharelife_
> > 112007>
> >
> > ----------------------------------------------------------------------
> > --
> >
> > _______________________________________________
> > New York PHP Community Talk Mailing List
> > http://lists.nyphp.org/mailman/listinfo/talk
> >
> > NYPHPCon 2006 Presentations Online
> > http://www.nyphpcon.com
> >
> > Show Your Participation in New York PHP
> > http://www.nyphp.org/show_participation.php
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
>
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>



-- 
realm3 web applications [realm3.com]
freelance consulting, application development
(423) 506-0349
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to