¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > Server.CreateObject("WinHTTP.WinHTTPRequest.5.1") - ³×À̹ö °Ë»öÁ¤º¸ Àоî¿À±â ¿¹Á¦

µî·ÏÀÏ : 2019-10-30 16:41 Á¶È¸¼ö : 33,856


¾Æ·¡ ¼Ò½º´Â ³×À̹ö °Ë»öÁ¤º¸ Àоî¿À´Â ¿¹Á¦ ÀÔ´Ï´Ù.
 

  <%
  Response.Charset="euc-kr" 'aspÆäÀÌÁö charset¼³Á¤
  keyword = "love"

  URL = "https://endic.naver.com/search.nhn?sLn=kr&searchOption=all&query="&keyword

  set winhttp = Server.CreateObject("WinHTTP.WinHTTPRequest.5.1") 
  winhttp.SetTimeouts 10 * 1000, 30 * 1000, 30 * 1000, 30 * 1000
  winhttp.Open "GET",URL, False 
  winhttp.SetRequestHeader "User-Agent", "ASP/3.0"
  winhttp.SetRequestHeader "Host", "endic.naver.com"
  winhttp.SetRequestHeader "User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0"
  winhttp.SetRequestHeader "Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
  winhttp.SetRequestHeader "Accept-Language", "ko-KR,ko;q=0.8,en-US;q=0.5,en;q=0.3"
  winhttp.SetRequestHeader "Connection", "keep-alive"
  winhttp.SetRequestHeader "Upgrade-Insecure-Requests", "1"
  winhttp.SetRequestHeader "TE", "Trailers"
  winhttp.Send
  T = winhttp.ResponseText

  response.write tagFree(T)
  

'Á¤±Ô½ÄÀ» ÀÌ¿ëÇÑ HTML ű×Á¦°Å
  Function tagFree(str_)
		Dim temp_Str
		If Len(str_) > 0 Then
			Set crabz = New Regexp
			crabz.Pattern = "<[^>]+>"
			crabz.Global = True
			temp_Str = crabz.Replace(str_,"")
		End if
		tagFree = temp_Str	
  End  Function

 


%>






 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.