WmptWap/App_LocalResources/IPAccess.cs
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.OleDb;
/// <summary>
/// IPAccess 的摘要说明
/// </summary>
///
[System.ComponentModel.DataObject]
public class IPAccess
{
public static readonly string CONNSTRING=System.Configuration.ConfigurationManager.AppSettings["IPConnString"].ToString()+System.Web.HttpContext.Current.Server.MapPath(ConfigurationManager.AppSettings["dbPath"])+";";
public static readonly string COMMANDTEXT = "Select top 1 city,province from ip_address where ";
public static readonly string selectcityname = "Select pinyin from city_py Where city=";
public IPAccess()
{
}
// 获取客户端所在城市,省份,跳转域名
public string[] GetCustomCity()
{
string Ip = GetClientIP();
string[] ipcontent = new string[3];
try
{
long ipint = IPtoNum(Ip);
OleDbConnection oleconn = new OleDbConnection();
oleconn.ConnectionString = CONNSTRING;
OleDbCommand OleCommand = new OleDbCommand();
OleCommand.Connection = oleconn;
OleCommand.CommandText = COMMANDTEXT + ipint.ToString() + ">=ip1 and " + ipint.ToString() + "<=ip2 order by id desc";
oleconn.Open();
OleDbDataReader reader = OleCommand.ExecuteReader();
if (reader.HasRows)
{
reader.Read();
ipcontent[0] = reader["city"].ToString();
ipcontent[1] = reader["province"].ToString();
}
else
{
ipcontent[0] = "";
后面还有 52 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
