類代碼(cls.asp)
<%
ClassclsThief
PrivatestrUrl'偷取地址
PrivatestrValue'偷取的內容,所有內容
PrivatestrResult'偷取結果,可以具體某一塊內容
Privateflag'是否已經偷過
'-------初始化類--------'
PrivateSubClass_Initialize()
strUrl=""
strValue=""
strResult=""
flag=false
EndSub
'------類結束-----------'
PrivateSubClass_Terminate()
EndSub
'------初始化url屬性----'
PublicPropertyLeturl(ByValiurl)
strUrl=iurl
EndProperty
'------返回輸出內容----'
publicpropertygetvalue
value=strValue
endproperty
publicpropertygetresult
result=strResult
endproperty
'------------文字處理-----------'
privateFunctionBytesToBstr(body,Cset)
dimobjstream
setobjstream=Server.CreateObject("adodb.stream")
objstream.Type=1
objstream.Mode=3
objstream.Open
objstream.Writebody
objstream.Position=0
objstream.Type=2
objstream.Charset=Cset
BytesToBstr=objstream.ReadText
objstream.Close
setobjstream=nothing
EndFunction
'-------文字處理-------'
privateFunctionIchange(str)
DimfinalStr
DimicharCode
DiminextCode
Fori=1Tolenb(str)
icharCode=ascb(midb(str,i,1))
IficharCode<&H80Then
finalStr=finalStr&chr(icharCode)
Else
inextCode=ascb(midb(str,i+1,1))
finalstr=finalstr&chr(clng(icharCode)*&H100+cint(inextCode))
i=i+1
EndIf