added php function

added function to calculate to calculate distance between two points