use PHP to get distance