asp获取ip

Function GetIp() 
 Dim DulIp,ProIP 
 DulIp=Request.ServerVariables("HTTP_X_FORWARDED_FOR") 
 ProIP=Request.ServerVariables("REMOTE_ADDR") 
 If DulIp="" Then 
  GetIp=ProIP 
 Else
  GetIp=DulIp 
 End If 
End Function

你可能感兴趣的:(asp)