본문 바로가기

프로그램&DB/ASP

Request Object - ServerVariables Collection by Taeyo(김 태영)님

ALL_HTTP HTTP_CONNECTION:keep-alive HTTP_ACCEPT:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 HTTP_ACCEPT_CHARSET:windows-949,utf-8;q=0.7,*;q=0.3 HTTP_ACCEPT_ENCODING:gzip,deflate,sdch HTTP_ACCEPT_LANGUAGE:ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4 HTTP_COOKIE:__utma=110578560.469008146.1326864247.1326864247.1326864247.1; __utmz=110578560.1326864247.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=nanumi%20imageplus%20%EC%98%A4%EB%A5%98 HTTP_HOST:www.taeyo.pe.kr HTTP_REFERER:http://www.google.co.kr/url?sa=t&rct=j&q=request.servervariables&source=web&cd=1&sqi=2&ved=0CDAQFjAA&url=http%3A%2F%2Fwww.taeyo.pe.kr%2Flecture%2F3_beginner_Objects%2FRequest_ServerVariable.asp&ei=bFM7T6jHMOLPmAWk-NDGCw&usg=AFQjCNFgPzf07DkDjmuk00zcUg54kwW4ig&cad=rjt HTTP_USER_AGENT:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
ALL_RAW Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Charset: windows-949,utf-8;q=0.7,*;q=0.3 Accept-Encoding: gzip,deflate,sdch Accept-Language: ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4 Cookie: __utma=110578560.469008146.1326864247.1326864247.1326864247.1; __utmz=110578560.1326864247.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=nanumi%20imageplus%20%EC%98%A4%EB%A5%98 Host: www.taeyo.pe.kr Referer: http://www.google.co.kr/url?sa=t&rct=j&q=request.servervariables&source=web&cd=1&sqi=2&ved=0CDAQFjAA&url=http%3A%2F%2Fwww.taeyo.pe.kr%2Flecture%2F3_beginner_Objects%2FRequest_ServerVariable.asp&ei=bFM7T6jHMOLPmAWk-NDGCw&usg=AFQjCNFgPzf07DkDjmuk00zcUg54kwW4ig&cad=rjt User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7
APPL_MD_PATH /LM/w3svc/1196976615/ROOT
APPL_PHYSICAL_PATH d:\TaeyoRoot\www\
AUTH_PASSWORD  
AUTH_TYPE  
AUTH_USER  
CERT_COOKIE  
CERT_FLAGS  
CERT_ISSUER  
CERT_KEYSIZE  
CERT_SECRETKEYSIZE  
CERT_SERIALNUMBER  
CERT_SERVER_ISSUER  
CERT_SERVER_SUBJECT  
CERT_SUBJECT  
CONTENT_LENGTH 0
CONTENT_TYPE  
GATEWAY_INTERFACE CGI/1.1
HTTPS off
HTTPS_KEYSIZE  
HTTPS_SECRETKEYSIZE  
HTTPS_SERVER_ISSUER  
HTTPS_SERVER_SUBJECT  
INSTANCE_ID 1196976615
INSTANCE_META_PATH /LM/W3SVC/1196976615
LOCAL_ADDR 119.205.211.120
LOGON_USER  
PATH_INFO /lecture/3_beginner_Objects/Request_ServerVariable.asp
PATH_TRANSLATED d:\TaeyoRoot\www\lecture\3_beginner_Objects\Request_ServerVariable.asp
QUERY_STRING  
REMOTE_ADDR 175.193.183.131
REMOTE_HOST 175.193.183.131
REMOTE_USER  
REQUEST_METHOD GET
SCRIPT_NAME /lecture/3_beginner_Objects/Request_ServerVariable.asp
SERVER_NAME www.taeyo.pe.kr
SERVER_PORT 80
SERVER_PORT_SECURE 0
SERVER_PROTOCOL HTTP/1.1
SERVER_SOFTWARE Microsoft-IIS/6.0
URL /lecture/3_beginner_Objects/Request_ServerVariable.asp
HTTP_CONNECTION keep-alive
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_CHARSET windows-949,utf-8;q=0.7,*;q=0.3
HTTP_ACCEPT_ENCODING gzip,deflate,sdch
HTTP_ACCEPT_LANGUAGE ko-KR,ko;q=0.8,en-US;q=0.6,en;q=0.4
HTTP_COOKIE __utma=110578560.469008146.1326864247.1326864247.1326864247.1; __utmz=110578560.1326864247.1.1.utmcsr=google|utmccn=(organic)|utmcmd=organic|utmctr=nanumi%20imageplus%20%EC%98%A4%EB%A5%98
HTTP_HOST www.taeyo.pe.kr
HTTP_REFERER http://www.google.co.kr/url?sa=t&rct=j&q=request.servervariables&source=web&cd=1&sqi=2&ved=0CDAQFjAA&url=http%3A%2F%2Fwww.taeyo.pe.kr%2Flecture%2F3_beginner_Objects%2FRequest_ServerVariable.asp&ei=bFM7T6jHMOLPmAWk-NDGCw&usg=AFQjCNFgPzf07DkDjmuk00zcUg54kwW4ig&cad=rjt
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.77 Safari/535.7

그리고, 다음 소스는 위의 결과가 나오게 하는 소스이랍니다.. 여러분도 다음 소스를 돌려보시면 위와같은 모습의 결과를 얻을 수 있을 것입니다.

<HTML>
<BODY>
    <TABLE >
    <% For Each key in Request.ServerVariables %>
        <TR>
            <TD><%=key %></TD>
            <TD>
            <% 
                if Request.ServerVariables(key) = "" Then
                    Response.Write " " 
                else 
                    Response.Write Request.ServerVariables(key)
                end if
            %>
            </TD>
        </TR>
    <% Next %>
    </TABLE>
</BODY>
</HTML>

 출처 - http://www.taeyo.pe.kr/lecture/3_beginner_Objects/Request_ServerVariable.asp