透过代理,显示客户端ip地址

类别:Asp 点击:0 评论:0 推荐:
        Dim user_IP As String
        'proxy
        If Not Request.ServerVariables("HTTP_VIA") Is Nothing Then
            user_IP = Request.ServerVariables("HTTP_X_FORWARDED_FOR").ToString()
        Else
            user_IP = Request.ServerVariables("REMOTE_ADDR").ToString()
        End If
 'client ip address
        TextBox1.Text = user_IP
 'server name
        TextBox2.Text = Server.MachineName

本文地址:http://com.8s8s.com/it/it8931.htm