Updated: 02/28/2007


This script is based on the free OpenGeoDB MySQL database. It is an easy to use single function, which queries in the database both country codes and calculates by the geographical coordinates the distance. The base distance is in nautical miles and will be converted to kilometers, but it is easy to change this to miles or any other unit.