string ipFilePath = @"~/App_Data/QQWry.dat";
QQWryLocator QQWry = new QQWryLocator(Server.MapPath(ipFilePath));
IPLocation loc = QQWry.Query(ip);
string country = loc.Country;
foreach (DataRow dr in ds.Tables[0].Rows)
{
if (country.Contains(dr["CityName"].ToString()))
{
Session["CityOrg"] = dr["CityOrg"].ToString();
Session["CityID"] = dr["CityID"].ToString();
}
}
Session["oip"] = string.Format("{0}and {1}", loc.Country, loc.Local);
Session.Timeout = 4;
时间: 2024-10-19 08:30:17