public function getDistance($lat1, $lgn1, $lat2, $lgn2){
        $earth_radius = 6371;
        $alpha = $lat1 - $lat2;
        $beta = $lgn1 - $lgn2;
        $h = pow((sin(deg2rad($alpha/2))), 2) +  cos(deg2rad($lat1)) * cos(deg2rad($lat2)) * pow(sin(deg2rad($beta/2)),2);
        $dist = 2*$earth_radius*sqrt($h);

        return $dist;
    }