Copy Code code as follows:
<%
Function Bytes2bstr (Vin,cset)
Dim Bytesstream,stringreturn
Set Bytesstream = Server.CreateObject ("ADODB. Stream ")
Bytesstream.type = 2
Bytesstream.open
Bytesstream.writetext Vin
bytesstream.position = 0
Bytesstream.charset = CSet
Bytesstream.position = 2
Stringreturn =bytesstream.readtext
Bytesstream.close
Set Bytesstream = Nothing
Bytes2bstr = Stringreturn
End Function
Set xmlhttp = server. CreateObject ("Msxml2.xmlhttp")
M_queryurl = "Http://www.microsoft.com/china/technet/security/current.mspx"
XMLHTTP. Open "Get", M_queryurl, False
Xmlhttp.send ()
s = xmlhttp.responsebody
AA = Bytes2bstr (S, "GB2312")
Set re = New RegExp
Re. Pattern = "<span class=" "Label" ">.*?<\/span>"
Re. Global = True
Re. IgnoreCase = True
Re. MultiLine = False
Set matches = Re. Execute (AA)
Dim tmp
TMP = ""
For the match in matches
TMP = Tmp&match.value
Next
TMP = Replace (tmp, "href=" "", "Target=_blank href=" "http://www.microsoft.com")
Set fso = server. CreateObject ("Scripting.FileSystemObject")
Set F = fso. OpenTextFile (Server.MapPath ("microsoft.html"), 2,true)
F.write (TMP)
F.close
Set fso = Nothing
Response. Redirect "Microsoft.html"
%>