asp.net DZ论坛中根据IP地址取得所在地的代码

2019-05-12 06:36:05于海丽

/// <returns></returns>
protected bool IsNumeric(string str)
{
if (str != null && System.Text.RegularExpressions.Regex.IsMatch(str, @"^-?d+$"))
return true;
else
return false;
}

protected UInt32 GetUInt32()
{
byte[] TempByte4 = new byte[4];
FileStrm.Read(TempByte4, 0, 4);
return BitConverter.ToUInt32(TempByte4, 0);
}
}

}

需要用到IP数据库,在打包中有。打包下载http://xiazai.jb51.net/200810/others/iptoaddress.rar