public string getrealip()
{
string ip = "";
if (null != Request.Headers["X-Real-IP"])
{
ip = Request.Headers["X-Real-IP"];
}
else
{
ip = Request.UserHostAddress;
}
return ip;
}
获取访问机器IP方法
最新推荐文章于 2022-03-11 17:21:02 发布