to scan the ip location from qqwry.dat 扫描的ip地址qqwry.dat 配合纯真IP库使用! /// /// 到IP库匹配 /// /// 城市拼音 /// public string IpScaner(string CityName) { IPScaner objScan = new IPScaner(); string ip = Request.UserHostAddress.ToString(); objScan.DataPath = Server.MapPath("/ip/QQWry.Dat"); objScan.IP = ip; string addre = objScan.IPLocation(); string err = objScan.ErrMsg; if (err == null) { cityscore.GetCity(addre); } else { CityName = "beijing"; } return CityName; }