본문 바로가기
반응형

Development271

서버사이드 비동기 접근 Dim HttpURL HttpURL = "http://192.168.0.0/Publish/gm_DataRequest.asp" Dim oXmlHTTP Set oXmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP") 'oXmlHTTP.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" oXmlHTTP.Open "GET", HttpURL, false oXmlHTTP.Send "" Dim HttpStatus Dim WriteStr HttpStatus = oXmlHTTP.Status If Err.Number 0 Or HttpStatus 200 Then if HttpStatus = 404 then Wri.. 2013. 5. 30.
ASP 에서 XML파서를 이용한 AJAX 한글처리 //XMLHttpRequest 객체생성var oXmlHTTP = getXmlHttp();if (window.XMLHttpRequest){ oXmlHttp = new XMLHttpRequest();}else{ oXmlHttp = new ActiveXObject("Microsoft.XMLHTTP");}oXmlHTTP.open("POST", "AJAX.asp", false); // 동기방식으로 연결 //리퀘스트 내용을 XML문자열로 만든다. ASP는 기본적으로 EUC-KR로 처리하기 때문에 따로 정의할필요는 없습니다.//한글을 전송할때는 태그내용을 로 선언해야 합니다.var strXML = "";strXML = strXML + "";strXML = strXML + "";strXML = strXML + "";/.. 2013. 5. 30.
XMLHTTP url1 = "http://icon.hanmail.net/top/0303/logo2.gif"Set xh = CreateObject("MSXML2.ServerXMLHTTP")xh.Open "GET", url1, falsexh.Send()imgData = xh.ResponseBodySet xh = Nothing Set stm =CreateObject("ADODB.Stream")stm.open()stm.type=1stm.write imgDatastm.SaveToFile Server.MapPath("/") & "\logo.gif", 2stm.close()Set stm = Nothing 2013. 5. 30.
MSXML2.ServerXMLHTTP How do I read the contents of a remote web page?You can include static txt and HTML files from remote servers by using a component (such as AspHTTP, ASPTear 1.50, or VB's built in InetCtrls) to parse the remote URL's content. You can also try this method out; it was tested with the MSXML objects which are installed with Windows 2000. You should make sure you have the latest versions of MSXML and.. 2013. 5. 30.
반응형