달력

42024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

<%

function getInfo_function(xurl)


  dim RStr

  dim xmlClient


  Set xmlClient = Server.CreateObject("Microsoft.XMLHTTP")

  xmlClient.open "GET", Xurl, False

  xmlClient.setRequestHeader "Content-Type","text/xml"

  xmlClient.setRequestHeader "Accept-Language","ko"

  xmlClient.send


  if xmlClient.status = 200 then

   Set responseStrm = CreateObject("ADODB.Stream") 

   responseStrm.Open 

   responseStrm.Position = 0 

   responseStrm.Type = 1 

   responseStrm.Write xmlClient.responseBody

   responseStrm.Position = 0

   responseStrm.Type = 2

   responseStrm.Charset = "utf-8" 

   RStr = responseStrm.ReadText  

   responseStrm.Close

   Set responseStrm = Nothing

  else

   RStr = "get_fail"

  end if


  SET xmlClient = nothing

  getInfo_function = RStr


end function


%>


<%

read_data = getInfo_function("http://")

response.write(read_data)

%>


출처 : http://horangi.tistory.com/2


'ASP' 카테고리의 다른 글

asp 폴더 내 파일 목록 보기  (0) 2012.07.09
asp xml 파싱  (0) 2012.07.09
ASP UTF-8 파일 읽기,쓰기 및 실행 예제  (0) 2012.05.11
ASP 날짜 처리 함수  (0) 2012.05.10
ASP 종료 함수  (0) 2012.04.05
Posted by dewlit
|