当前位置 : 主页 > 网页制作 > Nodejs >

WebService 获取客户端信息

来源:互联网 收集:自由互联 发布时间:2021-06-24
https://blog.csdn.net/chuntian1983/article/details/2233191 https://www.cnblogs.com/00OO/archive/2011/04/30/2033633.html https://www.cnblogs.com/kingboy/archive/2013/08/18/3266255.html https://www.cnblogs.com/davytitan/archive/2012/09/13/268

https://blog.csdn.net/chuntian1983/article/details/2233191
https://www.cnblogs.com/00OO/archive/2011/04/30/2033633.html
https://www.cnblogs.com/kingboy/archive/2013/08/18/3266255.html
https://www.cnblogs.com/davytitan/archive/2012/09/13/2682852.html

string?result?=?HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
???if?(null?==?result?||?result?==?String.Empty)
???{
????result?=?HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
???}
???if?(null?==?result?||?result?==?String.Empty)
???{
????result?=?HttpContext.Current.Request.UserHostAddress;
???}
???return?result;
网友评论