A class that calculates the distance between two locations using google maps and returns it as kilometers or miles. This script is using the Google Maps API geographic coordinates to calculate the distance between cities, addresses or zip/postal codes. It doesn’t require any PHP knowledge and it is easy to setup and use.