User login

Geolocation

# Get geolocation information from city name, Google maps API:

curl -X GET "http://maps.googleapis.com/maps/api/geocode/json?address=\"city\"&sensor=true" | \
grep -i location\" -A 2 | grep -v location

# Get geo info from an IP address:

curl -s  "http://www.ipinfodb.com/ip_locator.php?ip=IP" |grep -iE "(Country :|City :)" | \
sed -e "s/<[^>]*>//g"

# Get own IP (e.g. behind NAT):

curl -s icanhazip.com

#Region by coordinates in Excel (imprecise):

=IF(AND(AND(K2<=37.5;K2>=25.2);AND(L2<=77;L2>=34));"ME";IF(AND(AND(K2<=37.2;K2>=-37.85);AND(L2<=51;L2>=-23.75));"AF";IF(AND(L2<=140;L2>=39);"EA";"?")))