一小偷类!!有兴趣的可以看看

网络编程 2025-03-31 01:23www.168986.cn编程入门

原文:

在这个繁忙的世界中,每个人都有自己的故事,每一本未读完的书都是一段等待被揭晓的旅程。书中的每一页都像是窗外的风景,随着翻页而变换,带我们走进不同的世界。从古典名著到现代流行小说,从科学到哲学思考,书籍无处不在展示着人类智慧的结晶。每一本书都是一个独特的宇宙,包含着作者的奇思妙想和情感的。读书就是一次内心的旅行,我们在文字中寻找答案,在故事的转折中体验生活的喜怒哀乐。沉浸在这样的旅程中,我们仿佛可以跨越时空的界限,与书中的人物共同经历他们的冒险。每一本书都像一面镜子,反映出我们内心深处的渴望和梦想。让我们拿起书,开始这段奇妙的旅程,让心灵在阅读中放飞。

在这个瞬息万变的时代,每一个人都在谱写自己的故事篇章,而每一本尚未翻阅的书,则是一段待启程的心灵之旅。书页仿佛翅膀,载着我们飞翔于知识的天空,每一翻都是一场新的冒险。从古典文学的经典之作到现代流行小说的新鲜气息,从科学的神秘面纱到哲学的深邃思考,书籍的海洋承载着人类智慧的宝藏。每一本书都是一个独特的宇宙空间,凝聚着作者的匠心独运和情感的。读书就是一次心灵的旅行,我们在字里行间寻找答案的线索,在故事的跌宕起伏中感受生活的酸甜苦辣。沉浸在这样的旅程中,我们仿佛可以跨越时空的壁垒,与书中的人物共同经历他们的冒险故事。每一本书都像一面心灵的镜子,映照出我们内心深处的渴望和梦想。让我们拥抱书籍,开启这场心灵之旅,让思绪在阅读中自由飞翔,让智慧的火花在书页间燃烧。

类代码(cls.asp)

<%

Class clsThief

'偷取属性

Private strUrl '偷取的

Private strValue '偷取的内容,所有内容

Private strResult '偷取结果,可以具体某一块内容

Private flag '是否已经偷过

'-初始化类--

Private Sub Class_Initialize()

strUrl = ""

strValue = ""

strResult = ""

flag = false

End Sub

'类结束--

Private Sub Class_Terminate()

End Sub

'初始化url属性-

Public Property Let url(ByVal iurl)

strUrl = iurl

End Property

'返回输出内容-

Public Property Get value

value = strValue

End Property

Public Property Get result

result = strResult

End Property

'文字处理--

Private Function BytesToBstr(body, Cset)

Dim objstream

Set objstream = Server.CreateObject("adodb.stream")

objstream.Type = 1

objstream.Mode = 3

objstream.Open

objstream.Write body

objstream.Position = 0

objstream.Type = 2

objstream.Charset = Cset

BytesToBstr = objstream.ReadText

objstream.Close

Set objstream = Nothing

End Function '-文字处理-' '-内容抓取--' Public Sub Seize()

If strUrl <> "" Then Dim iconnect Set iconnect = CreateObject("Microsoft.XMLHTTP") iconnect.open "GET", strUrl, false iconnect.send() strValue = BytesToBSTR(iconnect.responseBody,"GB2312") flag = true set iconnect = nothing If err.number <> 0 Then err.Clear Else response.write("请设置url的属性,即url地址") End If end Sub '内容分析' Public Sub Assay(head,headCusor,bot,botCusor)

If flag = false Then Call Seize()

If instr(strValue, head) And instr(strValue, bot) Then Dim inum inum = len(strValue) - instr(strValue, head) - len(head) - headCusor strValue = right(strValue, inum) inum = instr(strValue, bot) - 1 + botCusor strResult = left(strValue, inum) Else strResult = "没有匹配到相关记录,请检查开始标记代码是否唯一" End If end Sub ...其他代码保持不变... 引用页(test.asp) <!--Include File="cls.asp"--> <% dim myThief,value set myThief = new clsThief '实例化类 myThief.CheckFile "","index.html" '检测是否已经偷过并生成 myThief.url=" '目标URL myThief.Seize '开始偷取 myThief.Assay "<html>",-7,"</html>",7 '剪切标记 myThief.Change "择优","浪人" '进行替换 value = myThief.result '得到的内容 myThief.MakeFile "","index.html" '生成文件 set myThief = nothing '展示结果 response.write value %> Cambrian渲染完成后的页面主体内容。

上一篇:destoon数据库表说明汇总 下一篇:没有了

Copyright © 2016-2025 www.168986.cn 狼蚁网络 版权所有 Power by