獲取用戶真實IP地址代碼
Public Function GetIp(getType)
If getType = 0 then
GetIp = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
if GetIp = "" Then getIp = Request.ServerVariables("REMOTE_ADDR")
ElseIf getType = 1 Then
GetIp = Request.ServerVariables("LOCAL_ADDR")
Else
GetIp = "<span style=""color:#FF0000"">未知</span>"
End if
If GetIp = "::1" Then GetIp = "127.0.0.1"
End Function
'使用方法
dim i
i=1
GetIp(1)