| Gzu521.com我的学习网 |
|
通用function,如果不能取真实ip,就会取代理ip 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 |
责任编辑:gzu521