在PHP ZIP codeS之间的距离计算 [英] Calculating distance between zip codes in PHP

查看:144
本文介绍了在PHP ZIP codeS之间的距离计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我抓住的zip codeS的数据库和他们langitudes /纬度等从这个 此页面。它得到了以下字段:

I grabbed a database of the zip codes and their langitudes/latitudes, etc from this This page. It has got the following fields:

ZIP,纬度,经度,市,州,县,ZIP_CLASS

ZIP, LATITUDE, LONGITUDE, CITY, STATE, COUNTY, ZIP_CLASS

中的数据是在一个文本文件,但我插入到一个MySQL表。我现在的问题是,我该如何利用上述领域的计算,用户可以在网站上输入两个拉链codeS之间的距离?工作code在PHP中会pciated AP $ P $

The data was in a text file but I inserted it into a MySQL table. My question now is, how can i utilise the fields above to calculate the distance between two zip codes that a user can enter on the website? Working code in PHP will be appreciated

推荐答案

您也可以尝试打一个Web服务来calc下的距离。让别人做繁重。

You can also try hitting a web service to calc the distance. Let someone else do the heavy lifting.

HTTP://www.$c$cbump.com/services/PlaceLookup。 ASMX

这篇关于在PHP ZIP codeS之间的距离计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆