Robert Kent


Personal blog of Robert Kent

PHP: Distance between two points

This snippet uses the latitude and longitude of two locations and calculates the distance between them. Results are given in both miles and metric units.

Example usage: