获取真实IP:
获取真实IP
获取代理IP:
    public static string GetViaIP()
    
{
        
string viaIp = null;
        
try
        
{
            HttpRequest request 
= HttpContext.Current.Request;
            
if (request.ServerVariables["HTTP_VIA"!= null)
            
{
                viaIp 
= request.UserHostAddress;
            }

        }

        
catch (Exception e)
        
{
            
throw e;
        }

        
return viaIp;
    }
posted on 2007-05-22 19:17  刺猬博客  阅读(1160)  评论(1)    收藏  举报