: :
复制代码代码如下:
<٪
onerrorresumenext
dimobjxmlhttp ، xml
setxml = server.createBject ("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 (instr (1 ، TMPSTR ، "meta_data2"))+18
TMPSTR = استبدال (TMPSTR ، VBCRLF ، "")
TMPSTR = استبدال (TMPSTR ، CHR (9) ، "")
TMPSTR = استبدال (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.Open
Astream.charset = "GB2312"
Astream.position = 0
Astream.WriteTextMyData ، 1
Astream.savetofilerecfilen ، 2
Astream.close
setastream1 = server.createBject ("adodb.stream")
Astream1.type = 2
Astream1.mode = 3
Astream1.charset = "GB2312"
Astream1.Open
Astream1.Loadfromfile (recfilen)
ASSP = Astream1.size
CRTTMPSTR = ASTEREAM1.READTEXT (ASSP)
Astream1.close
sp1 = clng (instr (1 ، crttmpstr ، "meta_data1"))+16
ep1 = clng (instr (sp1 ، crttmpstr ، "name = meta_data2")-7
LTH1 = EP1-SP1
NewData = Mid (CRTTMPSTR ، SP1 ، LTH1)
٪>
<html>
<head>
<metahttp-equiv = "content-type" content = "text/html ؛ charset = gb2312">
<style>
جسم{
حجم الخط: 12 بكسل
}
td {
حجم الخط: 12 بكسل
}
</style>
<title> 用 ASP 获取 dll 加密新闻内容 </title>
<tablewidth = "540" border = "0" align = "center" cellpadding = "0" cellspacing = "0">
<tr>
<td> 更新时间: <٪ = الآن ٪> 获取内容长度: <٪ = LTH1 ٪>
字节
注意要使用 http://127.0.0.1/ip1htmlview.dll 你得先下载这个 dll 文件 , 怎么下不用多说吧?!
<ObjectId = htmlip1viewcodebase = http: //127.0.0.1/ip1htmlview.dll#version=1،0،14classid=clsid: d854fc15-d3ea-496a-b2a0-a772a3de1d09>
<ParmName = "meta_data1" value = "<٪ = newData ٪>">