본문 바로가기

classic asp

(36)
[classic asp] XML 읽기 Set Xml = Server.CreateObject("Chilkat_9_5_0.Xml") 'success = Xml.LoadXml(responseXml) success = Xml.LoadXmlFile(Server.MapPath("./") & "\test.xml") Response.Write "하위노드개수: " & xml.NumChildrenAt("car") & " " Response.Write "특정노드 내용: " & Xml.GetChildContent("car|suv|name[2]|price") & "~" Set qualData = Xml.FindChild("car|suv") idx = qualData.NumChildrenHavingTag("name") i = 0 Do While i < idx 'na..
[classic asp] json 요청하고 응답받기 (mime) 0 Then Dim lngBytesCount lngBytesCount = Request.TotalBytes jsonstring = BytesToStr(Request.BinaryRead(lngBytesCount)) success = mime.LoadMime(jsonstring) jsonstring = mime.GetEntireBody() '본문스트링 '디코딩 set crypt = Server.CreateObject("Chilkat_9_5_0.Crypt2") crypt.CryptAlgorithm = "none" crypt.EncodingMode = "base64" response.write "원본메시지: " & jsonstring jsonstring = crypt.DecryptStringENC(jsonstr..
[classic asp] Stream 이용한 파일 읽어오기 Set objStream = CreateObject("ADODB.Stream") objStream.CharSet = "utf-8" objStream.Open objStream.LoadFromFile(Server.Mappath("../email/send_pw.html")) MailContent = objStream.ReadText() objStream.Close Set objStream = Nothing MailContent = Replace(MailContent, "#NAME#", MemberName)
[classic asp] 정규식 Function RegExpReturn(Str) Dim RegExp, ResultStrSet RegExp =  New RegExpRegExp.IgnoreCase = True 'TRUE:대소문자 구분안함, FALSE:대소문자구분RegExp.Global = True '전체, 첫번째 일치RegExp.Pattern = "" '태그제거 'RegExp.Pattern = "\(.*?\)" '괄호제거'RegExp.Pattern = "【.+?(】)" '【 】사이의 데이터'RegExp.Pattern = "\(.+?(\))" '( ) 사이의 데이터'RegExp.Pattern = "[^가-힣]"  '한글만'RegExp.Pattern = "[^-0-9 ]"  '숫자만'RegExp.Pattern = "[^-a-zA-Z]"  '영..
[classic asp] 파일/폴더관리 FileSystemObject Ex1 C드라이브의 남은 공간 : bytes FileSystemObject 예제 Config.sys 화일의 정보 file size : bytes file type : file path : FSO 텍스트화일 만들기 FSO 텍스트화일에 쓰기 글쓰기 완료!! FSO 텍스트화일 읽기
[classic asp] 웹페이지 태그 소스가져오기 '페이지로드Post방식Function getSiteSourcePost( siteURL, params ) Set httpObj = Server.CreateObject("WinHttp.WinHttpRequest.5.1") httpObj.open "POST" , siteURL, False httpObj.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded" '포스트 방식시 위의 라인을 추가해 주어야 한다.   httpObj.Send params '포스트의 파라미터는 Send 호출시 같이 값을 넘겨 주어야 한다. httpObj.WaitForResponse If httpObj.Status = "200" Then  getSiteSourcePost ..
[classic asp] SMTP 이용한 이메일발송 '구글 Gmail 발송 샘플 Set Mail = CreateObject("CDO.Message") Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") ="smtp.gmail.com" Mail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 Mail.Configuration.Fields.Item ("..
[classic asp] 클래스에서 object 배열에 담기 '------------------------------------------------------------------'가족 속성Class Family Private m_FamilyName Private m_FamilyAge Public Property Get FamilyName() FamilyName = m_FamilyName End Property Public Property Let FamilyName(value) m_FamilyName = value End Property Public Property Get FamilyAge() FamilyAge = m_FamilyAge End Property Public Property ..