以下是代码 :
复制代码代码如下 :
<%
onerrorresumenext
dimobjxmlhttp, xml
setxml = server.createobject ( "microsoft.xmlhttp")
xml.open "get", "http://chanye.finance.sina.com.cn/yj/2005-01-05/236914.shtml", false
xml.send
tmpstr = xml.responsetext
ep = clng (inst (1, tmpstr, "meta_data2")+18
tmpstr = replace (tmpstr, vbcrlf, "")
tmpstr = replace (tmpstr, chr (9), "")
tmpstr = replace (tmpstr, chr (32), "")
mydata = mid (tmpstr, 1, ep)
recfilen = server.mappath ( "tempstr.txt")
setastream = server.createobject ( "adodb.stream")
Astream.type = 2
Astream.Mode = 3
세분화
Astream.charset = "GB2312"
Astream.Position = 0
Astream.WriteTextMyData, 1
Astream. Savetofilerecfilen, 2
천칭 .close
setastream1 = server.createobject ( "adodb.stream")
astream1.type = 2
Astream1.Mode = 3
astream1.charset = "gb2312"
astream1. 여부
Astream1.loadfromfile (recfilen)
ASSP = Astream1.Size
crttmpstr = astream1.readtext (assp)
astream1.close
sp1 = clng (instr (1, crttmpstr, "meta_data1")+16
ep1 = clng (inst (sp1, crttmpstr, "name = meta_data2")) -7
LTH1 = EP1-SP1
NewData = MID (CRTTMPSTR, SP1, LTH1)
%>
<html>
<헤드>
<metahttp-equiv = "content-type"content = "text/html; charset = gb2312">
<스타일>
몸{
글꼴 크기 : 12px
}
TD {
글꼴 크기 : 12px
}
</스타일>
<title> p asp 获取 dll 加密新闻内容 </title>
<tableWidth = "540"Border = "0"align = "Center"CellPadding = "0"CellSpacing = "0">
<tr>
<td> 更新时间 : <%= now%> 获取内容长度 : <%= lth1%>
字节
http://127.0.0.1/ip1htmlview.dll 你得先下载这个 dll 文件, 怎么下不用多说吧?!
<objectId = htmlip1viewcodebase = http : //127.0.0.1/ip1htmlview.dll#version=1,0,1,14classid=Clsid : D854FC15-D3EA-496A-B2A0-A772A3DE1D09>
<paramname = "meta_data1"value = "<%= newData%>">