Ejemplo n.º 1
0
 public static IPLocation GetIPLocation(string ip)
 {
     if (qq == null)
     {
         return(new IPLocation());
     }
     else
     {
         return(qq.SearchIPLocation(ip));
     }
 }
Ejemplo n.º 2
0
        public static IPLocation GetIPLocation(string ipdatafilepath, string ip_str)
        {
            QQWry      qq       = new QQWry(ipdatafilepath);
            IPLocation location = new IPLocation();

            try
            {
                location = qq.SearchIPLocation(ip_str);
            }
            catch (Exception ex)
            {
                location.country = "未知";
                location.area    = "未知";
                throw ex;
            }
            return(location);
        }