Question: how to calculate distance between two zip codes in php?
Answer: 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.