首页 > 网站 > 建站经验 > 正文

获取用户真!实IP地址代码

2019-11-02 15:22:59
字体:
来源:转载
供稿:网友

获取用户真实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 =

80s电影网[www.aikan.tv/special/80sdianyingwang/]
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)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表