GeoipDistance Function

Calculate the distance between geographical coordinates, latitude and longitude.

float GeoipDistance(float lat1, float lon1, float lat2, float lon2, int system)

Parameters

float lat1

The first IP latitude.

float lon1

The first IP longitude.

float lat2

The second IP latitude.

float lon2

The second IP longitude.

int system

The system of measurement, 0 = Metric(kilometers) or 1 = English(miles).

Return Value

The distance as result in specified system of measurement.