## How can I find the distance between two Pincodes in PHP?

In your zip table you need to grab the coordinates (lat,long) for the two points for which you want to get the distance….Haversine formula:

- R = earth’s radius (mean radius = 6,371km)
- Δlat = lat2− lat1.
- Δlong = long2− long1.
- a = sin²(Δlat/2) + cos(lat1). cos(lat2). sin²(Δlong/2)
- c = 2. atan2(√a, √(1−a))
- d = R.c.

**How do I measure the distance between two addresses on Google Maps?**

To measure the distance between two points:

- On your computer, open Google Maps.
- Right-click on your starting point.
- Select Measure distance.
- To create a path to measure, click anywhere on the map. To add another point, click anywhere on the map.
- When finished, on the card at the bottom, click Close .

**How do I measure the distance between two latitude longitude points on Google Maps?**

The formula for calculating longitude distance is: “Dep = d. long * Cos Mid. Lat” Dep is the same thing as miles.

### How do I calculate distance?

Measure distance between points

- On your Android phone or tablet, open the Google Maps app .
- Touch and hold anywhere on the map that isn’t a place’s name or icon.
- Select Measure distance .
- Move the map so that the black circle is on the next point you want to add.
- At the bottom right, tap Add point .

**How can I find the distance between two latitude and longitude in php?**

The query for retrieving all of the records within a specific distance by calculating distance in miles between two points of latitude and longitude are: $query = “SELECT *, (((acos(sin((“. $latitude. “*pi()/180)) * sin((`latitude`*pi()/180)) + cos((“.

**What is the formula to calculate distance on a map?**

Summary. To calculate distance on a map you must do the following: Measure distance between two points on a map in cm or mm. Multiply this by the scale of the map and divide by 100 000 if you used centimetres or by 1000 000 if you used millimetres to get kilometres.