Send Mail From Localhost with XAMPP

In php.ini [mail function] change to:

SMTP=smtp.gmail.com
smtp_port=587
sendmail_from = my-gmail-id@gmail.com
sendmail_path = “\”C:\xampp\sendmail\sendmail.exe\” -t”

In sendmail.ini replace to this:

[sendmail]
smtp_server=smtp.gmail.com
smtp_port=587
error_logfile=error.log
debug_logfile=debug.log
auth_username=my-gmail-id@gmail.com
auth_password=my-gmail-password

https://coderwall.com/p/zfwxvw/send-mail-from-localhost-with-xampp

How to setup local email server using XAMPP (Mercury mail): https://www.youtube.com/watch?v=7dcaUUlsMOg

GPS coordinate distance : Javascript

http://www.geodatasource.com/developers/javascript

function distance(lat1, lon1, lat2, lon2, unit) {
var radlat1 = Math.PI * lat1/180
var radlat2 = Math.PI * lat2/180
var theta = lon1-lon2
var radtheta = Math.PI * theta/180
var dist = Math.sin(radlat1) * Math.sin(radlat2) + Math.cos(radlat1) * Math.cos(radlat2) * Math.cos(radtheta);
dist = Math.acos(dist)
dist = dist * 180/Math.PI
dist = dist * 60 * 1.1515
if (unit==”K”) { dist = dist * 1.609344 }
if (unit==”N”) { dist = dist * 0.8684 }
return dist
}