A simple php library to calculate distance between two coordinates using:
- Great Circle Distance Formula
- Harversine Formula
$geoObj = new Geo();
$distance_in_metres = $geoObj->greatCircleDistance(
$latitude_from, $longitude_from, $latitude_to, $longitude_to
);
$geoObj = new Geo();
$distance_in_metres = $geoObj->haversineGreatCircleDistance(
$latitude_from, $longitude_from, $latitude_to, $longitude_to
);