CDN 가속 화 된 ASP 사이트 에서 사용자 의 실제 IP 프로그램 을 가 져 왔 습 니 다.
                                            
 1010 단어  실제 IP
                    
 
function checkip(checkstring)'     IP     
dim re1 
set re1=new RegExp 
re1.pattern="^[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}$" 
re1.global=false 
re1.Ignorecase=false 
checkip=re1.test(checkstring) 
set re1=nothing 
end function 
 
function get_cli_ip()'   IP  ,  HTTP_CLIENT_IP   HTTP_X_FORWARDED_FOR   REMOTE_ADDR 
dim client_ip 
if checkip(Request.ServerVariables("HTTP_CLIENT_IP"))=true then 
get_cli_ip = checkip(Request.ServerVariables("HTTP_CLIENT_IP")) 
else 
MyArray = split(Request.ServerVariables("HTTP_X_FORWARDED_FOR"),",") 
if ubound(MyArray)>=0 then 
client_ip = trim(MyArray(0)) 
if checkip(client_ip)=true then 
get_cli_ip = client_ip 
exit function 
end if 
end if 
get_cli_ip = Request.ServerVariables("REMOTE_ADDR") 
end if 
end function 
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
varnish 에이전트 nginx, nginx 로 하여 금 실제 client 의 ip 을 기록 하 게 합 니 다.최근 연구 에서 varnish 역방향 프 록 시 + 캐 시 를 배 웠 습 니 다. 구 글 은 오랫동안 nginx 로그 에 실제 client 의 ip 주 소 를 기록 하 는 것 을 실 현 했 습 니 다. 하 나 는 기...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.