CSDN博客

img y97523szb

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

发表于2004/6/28 16:09:00  1052人阅读

        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
0 0

相关博文

我的热门文章

img
取 消
img