ASP의 서버변수 Request.ServerVariables 컬렉션 예제 > 기술자료 | 해피정닷컴

ASP의 서버변수 Request.ServerVariables 컬렉션 예제 > 기술자료

본문 바로가기

사이트 내 전체검색

ASP의 서버변수 Request.ServerVariables 컬렉션 예제 > 기술자료

ClassicASP ASP의 서버변수 Request.ServerVariables 컬렉션 예제

페이지 정보


본문

ASP의 서버변수는 꽤나 다양하다.


## HTTP전체 문자열
all_http = request.ServerVariables("all_http")

- all_raw
- appl_md_path
- auth_password
- auth_type
- auth_user
- cert_cookie
- cert_flags
- cert_issuer
- cert_keysize
- cert_secretkeysize
- cert_serialnumber
- cert_server_issuer
- cert_subject

## HTTP 요청을 한 클라이언트에서 입력한 문자열의 총길이
content_length = Request.ServerVariables("CONTENT_LENGTH")

- content_type
- gateway_interface
- https
- http_accept
- http_accept_encoding
- http_accept_language
- http_cookie
- http_connection
- https_keysize
- https_secretkeysize
- https_server_issuer
- https_server_subject

## 홈페이지 주소중 ***.com 등을 제외한 경로
http_url = request.servervariables("http_url")
예시:  https://www.happyjung.com/123.asp?v=1&v=2
결과:  /123.asp?v=1&v=2

## HTTP 요청을 받은 서버 호스트 명( 도메인 명 )
http_host = Request.ServerVariables("http_host")

## 이전 페이지
http_referer = Request.ServerVariables("http_referer")

- http_user_agent
- instance_id
- instance_meta_path

## HTTP 요청을 받은 서버 호스트의 (아이피)
local_addr = Request.ServerVariables("local_addr")

## 사용자 LogOn 계정이름
logon_user = Request.ServerVariables("logon_user")

- path_info
- path_translated
- query_string

## 클라이언트 ip 주소 알아내기
remote_addr = Request.ServerVariables("remote_addr")

## HTTP 요청을 한 클라이언트 호스트 명 - 정보가 없으면 REMOTE_ADDR과 같음
remote_host = Request.ServerVariables("REMOTE_HOST")

- remote_user
- request_method
- script_name

## server_name
server_name = request.ServerVariables("server_name")
예시:  https://www.happyjung.com/123.asp?v=1&v=2
결과:  www.happyjung.com

'HTTP 요청과 응답에 사용되는 PORT ( 웹서버의 기본포트는 80 )
server_port = Request.ServerVariables("SERVER_PORT")

- server_port_secure

## HTTP 요청과 응답에 사용되는 프로토콜 버전
server_protocol = Request.serverVariables("SERVER_PROTOCOL")

## HTTP 요청을 받은 서버의 웹서버 버전 
server_software = Request.serverVariables("SERVER_SOFTWARE")

## 현재 페이지 이름
url = Request.ServerVariables("url")
예시:  https://www.happyjung.com/123.asp?v=1&v=2
결과:  /123.asp


============================


## 전체 서버변수를 뿌리는 예제
<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>


## 언어선택후 자동로딩 예제
https://www.happyjung.com/lecture/2683  로 이동


참고사자료
http://itisfun.tistory.com/48
http://www.webmadang.net/develop/develop.do?action=read&boardid=1001&page=4&seq=38

댓글목록

등록된 댓글이 없습니다.


Total 198건 7 페이지
  • RSS
기술자료 목록
78
ClassicASP   11072  2009-01-30 20:17  
77
ClassicASP   13868  2009-01-28 11:09 ~ 2015-01-31 00:00  
76
ClassicASP   12298  2009-01-23 14:41 ~ 2009-01-23 00:00  
75
ClassicASP   20129  2009-01-22 19:33  
74
ClassicASP   23560  2009-01-22 19:28  
73
ClassicASP   23315  2009-01-20 21:48  
72
ClassicASP   18537  2009-01-20 11:09 ~ 2016-10-21 00:00  
71
ClassicASP   18419  2009-01-20 08:35  
70
ClassicASP   11397  2009-01-19 16:27  
69
ClassicASP   20611  2009-01-16 19:22 ~ 2009-01-29 00:00  
68
ClassicASP   9920  2009-01-13 10:54  
67
ClassicASP   18184  2009-01-05 20:09 ~ 1970-01-01 09:00  
66
ClassicASP   13691  2008-12-31 05:55  
65
ClassicASP   11598  2008-12-11 17:35 ~ 2009-10-08 00:00  
64
ClassicASP   10295  2008-11-29 14:44  
63
ClassicASP   14296  2008-11-29 14:41 ~ 2012-06-09 00:00  
62
ClassicASP   14557  2008-11-26 23:02  
61
ClassicASP   13200  2008-08-25 20:42  
60
ClassicASP   16896  2008-08-25 18:06  
59
ClassicASP   23251  2008-08-02 18:01 ~ 2016-10-21 00:00  

검색

해피정닷컴 정보

회사소개 회사연혁 협력사 오시는길 서비스 이용약관 개인정보 처리방침

회사명: 해피정닷컴   대표: 정창용   전화: 070-7600-3500   팩스: 042-670-8272
주소: 서울센터 (08393) 서울시 구로구 디지털로32가길 16 파트너스타워2차 1206-280호
        대전센터 (34368) 대전시 대덕구 대화로 160 대전산업용재유통단지 지원1동 205호
개인정보보호책임자: 정창용   사업자번호: 119-05-36414
통신판매업신고: 2014-서울구로-0074 [사업자등록확인]  
Copyright 2001~2024 해피정닷컴. All Rights Reserved.