欢迎光临
我们一直在努力

用通ASP直接获取用户真实IP地址-ASP教程,ASP应用

建站超值云服务器,限时71元/月

private function getip()

dim stripaddr

if request.servervariables("http_x_forwarded_for") = "" or instr(request.servervariables("http_x_forwarded_for"), "unknown") > 0 then

stripaddr = request.servervariables("remote_addr")

elseif instr(request.servervariables("http_x_forwarded_for"), ",") > 0 then

stripaddr = mid(request.servervariables("http_x_forwarded_for"), 1, instr(request.servervariables("http_x_forwarded_for"), ",")-1)

elseif instr(request.servervariables("http_x_forwarded_for"), ";") > 0 then

stripaddr = mid(request.servervariables("http_x_forwarded_for"), 1, instr(request.servervariables("http_x_forwarded_for"), ";")-1)

else

stripaddr = request.servervariables("http_x_forwarded_for")

end if

getip = trim(mid(stripaddr, 1, 30))

end function

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » 用通ASP直接获取用户真实IP地址-ASP教程,ASP应用
分享到: 更多 (0)

相关推荐

  • 暂无文章