반응형

program/asp 6

[iis7] jquery, json cross domain 처리

a.com 에서 b.com 의 json 형태로 데이터를 받아와야 할일이 있었다. ( 크로스 도메인 cors 처리 ) 호출 ajax (a.com) $.ajax({ url: "http://b.com/called.asp" , type: "POST" , dataType: "json" , contentType: "application/json" , data: { "title":"test" } , error: function (res) { $("#print").text("error"); console.log("error"); } , success: function (res) { $("#print").text(res.title); console.log(res); } }); 호출되어지는 asp ( b.com ) 인터넷..

program/asp 2017.04.05

whois 접속iP를 이용한 국가코드 가져오기

function getCountyCode(countyIP) url = "http://whois.kisa.or.kr/openapi/ipascc.jsp?query="& countyIP &"&key=해당사이트에서키값을받아야한다&answer=xml" Set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP") objXmlHttp.open "POST", url , false objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded" objXmlHttp.send ''요청 strResponseText = objXmlHttp.responseText ''응답 텍스트 저장 Set objXmlHtt..

program/asp 2015.07.07

뺑뺑이 뽑기 (ASP)

Const RNDUSERCNT = 150 '몇명을 뽑을 것 인가. dim cnt: cnt = 0 ' 뽑힌 인원 수 dim dataCnt: dataCnt = 0 dim setUserIdx: setUserIdx = 0 dim strSQL: strSQL = "적당한쿼리로기준열1개의레코드셋을리턴" set objQuery = new clsQuery arrList = objQuery.getRs(strSQL, null, null) set objQuery = nothing dataCnt = ubound(arrList, 2) set dicUser = CreateObject("Scripting.Dictionary") ' 대상자 set Winner = CreateObject("Scripting.Dictionary") ' 뽑..

program/asp 2009.01.12