

def get_remote_user_location(ip=None, geoplugin_ip=__GEOIP_URL__):
    '\n    This method returns the current geolocation of a given IP address by using\n    the WebService provided by GeoPlugin. In case no ip address is given, it\n    returns None.\n    :param ip: IP address for the remote user\n    :param geoplugin_ip: URL of the WebService to resolve the IP address\n    '
    if (not ip):
        return (__SLO_LAT__, __SLO_LON__)
    if (ip == '127.0.0.1'):
        return (__SLO_LAT__, __SLO_LON__)
    r = misc.load_json_url((geoplugin_ip + ip))
    latitude = r['geoplugin_latitude']
    longitude = r['geoplugin_longitude']
    return (latitude, longitude)

dataset/ETHPy150Open satnet-project/server/services/common/gis.py get_remote_user_location/original