NYCPHP Meetup

NYPHP.org

[nycphp-talk] distances between two zip codes

Anthony Papillion anthony at adcl.biz
Sat Dec 8 02:36:37 EST 2007


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




More information about the talk mailing list