手機(jī)ip地址怎么修改 如何獲取登錄用戶(hù)的IP地址?
如何獲取登錄用戶(hù)的IP地址?public static string GetIP() { string ip if (System.Web.H
如何獲取登錄用戶(hù)的IP地址?
public static string GetIP() { string ip if (System.Web.HttpContext.Current.Request.ServerVariables["HTTP_VIA"] != null) { ip = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"].ToString() } else { ip = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString() } return ip }