푸른청년 푸르게 살고있나?  
home | 살아가기 | news | 세상보기 | tip&tech | 방명록 |  
   전체
   asp
   php
   jsp
   mssql
   mysql
   informix
   linux
   unix
   win2000
   javascript
   html
   oracle
   java
   etc
    
:: Tip&Tech > asp
[ASP] 리모트사이트의 페이지를 그대로 긁어오고 싶으면..
ms사에서  제공하는  MSXML2.ServerXMLHTTP라는  걸  이용해도  되는데..
요게 안될때가 많다.

요걸 쓰는 방법은..
<%
url = "http://time.hani.co.kr/hanitime/include/nav_family.txt"
Set xmlHttp = Server.CreateObject("MSXML2.ServerXMLHTTP")

xmlHttp.open "GET",url, false

xmlHttp.send()

response.binaryWrite xmlHttp.responseBody
set xmlHttp= Nothing
%>

그래서 무지 고생끝에 찾아낸게.. urlfetch라는 프리컴포넌트다..
하지만 부하가 심한곳에서는 느려지는 단점이 있다.
그렇지 않은 곳에서는 유용하게 쓸수 있을것이다.
system32 폴더에 넣고 코맨드 창에서 그 폴더로 들어간후
regsvr32 urlfetch.dll 해주면 컴포넌트 등록되고 쓸수 있다.

<%
'create the object
Set URLFetchObj = Server.CreateObject("URLFetch.URLFetch")

'set the URL you want to retrieve (URLFetch assumes a GET
'request if you don't give it any POST data)
URLFetchObj.SetURL("http://time.hani.co.kr/hanitime/include/nav_family.txt")

'fetch the contents of the URL into the variable sResponse
sResponse = URLFetchObj.Fetch()

'write out the contents of sResponse to the client
Response.Write(sResponse)

'clean up after yourself!
Set URLFetchObj = Nothing
%>


첨부파일: urlfetch.zip, 날짜: 2003-08-13 11:35:51, 조회수: 3086

다음글 [ASP]이미지 깨지지 않고 리사이징 하기
이전글 [asp]따옴표 문제

꼬리말
글쓴이 비밀번호 #스팸글방지(주인장 닉네임을 쓰시오)

  
since by 2003.03.23 / 3th 2005.07.26 / 4th 2009.04.22 made by bluesoul