dim sUrl sUrl = "http://travel.state.gov/visa/frvi_bulletincurrent.html" Function streamtochar (StrStream) set stream = CreateObject ( "ADODB.Stream") stream.type = 1 Stream.Mode = 3 stream.open stream.write strstream stream.position = 0 stream.type = "GB2312" Streamtochar = stream.readtext Stream.close = Nothing = i = i 1 Function GetContentByurl (URL) set Xmlhttp = CreateObject ("msxml2.xmlhttp") xmlhttp.open "get", URL , false XmlHttp.send getContentByUrl = streamtochar (oXmlHttp.responseBody) set XmlHttp = nothing end function function getRealContent (url) sContent = getContentByUrl (url) getRealContent = sContent
DATE_START = INSTR (HTML, "Washington, D.c.") 57 DATE_END = INSTR (HTML, "A. STATUTORY") - 14 DATE_T = MID (HTML, DATE_START, DATE_END-DATE_START)
URL_END = INSTR (HTML, ") URL = MID (HTML, URL_START, URL_END-URL_START) URL = Replace (URL," ")